hmarr/mongoengine — Issue #430: Key Error When Defining Meta Without 'allow_inheritance'
Author: chwilliam
Created: 2012-02-16 20:47:03+00:00
State: open

In Base.py, there's a line:

if meta and not meta['allow_inheritance'] and not self.field:

If you have a meta dictionary defined, but "allow_inheritance" is not defined as a key in the document, you end up with a key error. It should read something like:

if meta and 'allow_inheritance' in meta and meta['allow_inheritance'] is False and not self.field: