mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-02-28 01:20:37 +03:00
Remove conditional around SmallAutoField
This was introduced in Django 3.0 and the project requires Django >= 3.2
This commit is contained in:
parent
96c09ac439
commit
882c433233
|
@ -183,19 +183,13 @@ def convert_field_to_string(field, registry=None):
|
|||
)
|
||||
|
||||
|
||||
@convert_django_field.register(models.SmallAutoField)
|
||||
@convert_django_field.register(models.BigAutoField)
|
||||
@convert_django_field.register(models.AutoField)
|
||||
def convert_field_to_id(field, registry=None):
|
||||
return ID(description=get_django_field_description(field), required=not field.null)
|
||||
|
||||
|
||||
if hasattr(models, "SmallAutoField"):
|
||||
|
||||
@convert_django_field.register(models.SmallAutoField)
|
||||
def convert_field_small_to_id(field, registry=None):
|
||||
return convert_field_to_id(field, registry)
|
||||
|
||||
|
||||
@convert_django_field.register(models.UUIDField)
|
||||
def convert_field_to_uuid(field, registry=None):
|
||||
return UUID(
|
||||
|
|
|
@ -115,7 +115,6 @@ def test_should_big_auto_convert_id():
|
|||
|
||||
|
||||
def test_should_small_auto_convert_id():
|
||||
if hasattr(models, "SmallAutoField"):
|
||||
assert_conversion(models.SmallAutoField, graphene.ID, primary_key=True)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user