Skip to content

Commit 0ac8709

Browse files
committed
fix: default value not working for input types
1 parent fe719f4 commit 0ac8709

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphene_pydantic/converters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def convert_pydantic_input_field(
6868
),
6969
)
7070
field_kwargs.setdefault("required", field.is_required())
71-
field_kwargs.setdefault("default_value", None if PydanticUndefined else field.default)
71+
field_kwargs.setdefault("default_value", None if type(field.default) is PydanticUndefined else field.default)
7272
# TODO: find a better way to get a field's description. Some ideas include:
7373
# - hunt down the description from the field's schema, or the schema
7474
# from the field's base model

0 commit comments

Comments
 (0)