mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-02-18 04:20:34 +03:00
Update converter.py
This commit is contained in:
parent
ab5e118975
commit
711be14fca
|
@ -49,7 +49,7 @@ def convert_django_field_with_choices(field, registry=None):
|
||||||
enum = Enum(name, list(named_choices), type=EnumWithDescriptionsType)
|
enum = Enum(name, list(named_choices), type=EnumWithDescriptionsType)
|
||||||
return enum(description=field.help_text, required=not field.null)
|
return enum(description=field.help_text, required=not field.null)
|
||||||
return convert_django_field(field, registry)
|
return convert_django_field(field, registry)
|
||||||
|
|
||||||
|
|
||||||
@singledispatch
|
@singledispatch
|
||||||
def convert_django_field(field, registry=None):
|
def convert_django_field(field, registry=None):
|
||||||
|
@ -76,7 +76,7 @@ def get_duration_field():
|
||||||
except:
|
except:
|
||||||
return models.CharField
|
return models.CharField
|
||||||
|
|
||||||
|
|
||||||
@convert_django_field.register(get_phone_number_field())
|
@convert_django_field.register(get_phone_number_field())
|
||||||
@convert_django_field.register(get_duration_field())
|
@convert_django_field.register(get_duration_field())
|
||||||
@convert_django_field.register(models.CharField)
|
@convert_django_field.register(models.CharField)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user