Fixing bug setting a value that equates to false
This commit is contained in:
@@ -762,7 +762,7 @@ class BaseDocument(object):
|
||||
if value:
|
||||
continue
|
||||
|
||||
# If we've set a value that ain't the default value unset it.
|
||||
# If we've set a value that ain't the default value dont unset it.
|
||||
default = None
|
||||
|
||||
if path in self._fields:
|
||||
@@ -789,8 +789,8 @@ class BaseDocument(object):
|
||||
if default is not None:
|
||||
if callable(default):
|
||||
default = default()
|
||||
if default != value:
|
||||
continue
|
||||
if default != value:
|
||||
continue
|
||||
|
||||
del(set_data[path])
|
||||
unset_data[path] = 1
|
||||
|
||||
Reference in New Issue
Block a user