Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
prozorro-sale
Schematics
Commits
9abe359b
Commit
9abe359b
authored
Sep 10, 2019
by
andrey484
Browse files
*change default value from none to undefined if field does not exist
parent
40c38910
Changes
1
Hide whitespace changes
Inline
Side-by-side
schematics/models.py
View file @
9abe359b
...
...
@@ -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
,
No
ne
)
if
f_value
is
No
ne
:
f_value
=
data
.
pop
(
field
,
Undefi
ne
d
)
if
f_value
is
Undefi
ne
d
:
f_value
=
f_obj
.
default
if
f_value
==
Undefined
:
continue
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment