Commit 9abe359b authored by andrey484's avatar andrey484
Browse files

*change default value from none to undefined if field does not exist

parent 40c38910
......@@ -75,8 +75,8 @@ class Model(metaclass=ModelMeta):
filter_func = get_role_func(self.__class__, context)
for field, f_obj in self.fields.items():
f_value = data.pop(field, None)
if f_value is None:
f_value = data.pop(field, Undefined)
if f_value is Undefined:
f_value = f_obj.default
if f_value == Undefined:
continue
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment