Various fixes again

This commit is contained in:
Matthieu Rigal
2015-06-24 00:50:36 +02:00
parent cd76a906f4
commit 0aeb1ca408
22 changed files with 88 additions and 89 deletions

View File

@@ -112,7 +112,7 @@ class BaseField(object):
"""Descriptor for assigning a value to a field in a document.
"""
# If setting to None and theres a default
# If setting to None and there is a default
# Then set the value to the default value
if value is None:
if self.null:
@@ -259,8 +259,8 @@ class ComplexBaseField(BaseField):
instance._data[self.name] = value
if (self._auto_dereference and instance._initialised and
isinstance(value, (BaseList, BaseDict))
and not value._dereferenced):
isinstance(value, (BaseList, BaseDict)) and
not value._dereferenced):
value = _dereference(
value, max_depth=1, instance=instance, name=self.name
)