Skip to content

Commit

Permalink
Fix 0 default values appearing as None
Browse files Browse the repository at this point in the history
  • Loading branch information
nkakouros committed Apr 6, 2024
1 parent ef25d00 commit 9711c83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python_jsonschema_objects/classbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ def _build_literal(self, nm, clsdata):
"__propinfo__": {
"__literal__": clsdata,
"__title__": clsdata.get("title"),
"__default__": clsdata.get("default") or clsdata.get("const"),
"__default__": clsdata["default"] if clsdata.get("default") is not None else clsdata.get("const"),
}
},
)
Expand Down

0 comments on commit 9711c83

Please sign in to comment.