Skip to content

Commit

Permalink
Merge pull request #286 from nkakouros/patch-1
Browse files Browse the repository at this point in the history
Fix 0 default values appearing as None
  • Loading branch information
cwacek committed May 19, 2024
2 parents ef25d00 + 9711c83 commit cc604ea
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 cc604ea

Please sign in to comment.