mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-14 06:04:23 +03:00
skip small auto field sometimes
This commit is contained in:
parent
b11416b8b7
commit
f04767178e
|
@ -166,8 +166,8 @@ 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.SmallAutoField)
|
||||
@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)
|
||||
|
|
|
@ -116,7 +116,8 @@ def test_should_big_auto_convert_id():
|
|||
|
||||
|
||||
def test_should_small_auto_convert_id():
|
||||
assert_conversion(models.SmallAutoField, graphene.ID, primary_key=True)
|
||||
if hasattr(models, 'SmallAutoField'):
|
||||
assert_conversion(models.SmallAutoField, graphene.ID, primary_key=True)
|
||||
|
||||
|
||||
def test_should_uuid_convert_id():
|
||||
|
|
Loading…
Reference in New Issue
Block a user