Skip to content

Commit

Permalink
fix: don't set None default (#4422)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal authored Mar 16, 2022
1 parent f557b2c commit d4d1635
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def _gen_from_last_field(
last_field_schema = self._fields_stack[-1]
# Generate the custom-description for the field.
description = last_field_schema.doc if last_field_schema.doc else None
if last_field_schema.has_default:
if last_field_schema.has_default and last_field_schema.default is not None:
description = (
f"{description}\nField default value: {last_field_schema.default}"
)
Expand Down

0 comments on commit d4d1635

Please sign in to comment.