mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 17:52:19 +03:00
Merge 979abd49e3
into f76f38ef30
This commit is contained in:
commit
f26b60d12a
|
@ -71,7 +71,8 @@ def convert_django_field_with_choices(field, registry=None):
|
|||
return named_choices_descriptions[self.name]
|
||||
|
||||
enum = Enum(name, list(named_choices), type=EnumWithDescriptionsType)
|
||||
converted = enum(description=field.help_text, required=not field.null)
|
||||
required = not (field.blank or field.null or field.default)
|
||||
converted = enum(description=field.help_text, required=required)
|
||||
else:
|
||||
converted = convert_django_field(field, registry)
|
||||
if registry is not None:
|
||||
|
|
Loading…
Reference in New Issue
Block a user