MongoEngine/mongoengine — pull request #419 by damoxc (2013-07-25 14:07:23+00:00)
Title: fields: fix embedded document within embedded map field

When you have an object schema as so:

class Embedded(EmbeddedDocument):
foo = StringField()

class TopLevel(Document):
stuff = MapField(MapField(EmbeddedDocumentField(Embedded)))

If the top level object you fetch doesn't contain all the dictionaries
required to get to the EmbeddedDocumentField then an AttributeError is
thrown, which is of course incorrect if all the fields are optional.
This commit seems to fix the behaviour for me.