skip small auto field sometimes

This commit is contained in:
Paul Bailey 2021-06-07 16:18:10 -05:00
parent b11416b8b7
commit f04767178e
2 changed files with 3 additions and 2 deletions

View File

@ -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)

View File

@ -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():