MongoEngine/mongoengine — pull request #233 by helduel (2013-02-19 14:16:04+00:00)
Title: KeyError when changing an EmbeddedDocument in a MapField

Hello!

Having a MapField with EmbeddedDocuments and a string key consisting only of digits results in a KeyError when saving. The exception occurs in the _delta function of base.py. Digit strings are always converted to ints, although this is not always true.

I patched it and added a unittest.

This fixes ticket https://github.com/MongoEngine/mongoengine/issues/232 .

Regards,
Manuel