Fix index build_spec #177

This commit is contained in:
Ross Lawley
2012-12-19 16:55:14 +00:00
parent 1c10f3020b
commit f335591045
4 changed files with 76 additions and 40 deletions

View File

@@ -525,7 +525,7 @@ class BaseDocument(object):
# Check to see if we need to include _cls
allow_inheritance = cls._meta.get('allow_inheritance',
ALLOW_INHERITANCE) != False
ALLOW_INHERITANCE)
include_cls = allow_inheritance and not spec.get('sparse', False)
for key in spec['fields']:

View File

@@ -749,7 +749,7 @@ class ReferenceField(BaseField):
if dbref is None:
msg = ("ReferenceFields will default to using ObjectId "
" strings in 0.8, set DBRef=True if this isn't desired")
"in 0.8, set DBRef=True if this isn't desired")
warnings.warn(msg, FutureWarning)
self.dbref = dbref if dbref is not None else True # To change in 0.8