Skip to content

Commit

Permalink
app.py: Fix set_default
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaofengli committed Jan 24, 2019
1 parent f622f8b commit 115a5c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
def set_defaults(model, payload):
for field, info in model.items():
if field not in payload or not payload[field]:
if info.default:
if info.default != None:
payload[field] = info.default
elif isinstance(info, (fields.Nested,)) and info.model:
payload[field] = {}
Expand Down

0 comments on commit 115a5c4

Please sign in to comment.