make small auto optional

This commit is contained in:
Paul Bailey 2021-06-07 16:26:29 -05:00
parent a135494078
commit a9e04ecab0

View File

@ -175,10 +175,8 @@ def convert_field_to_id(field, registry=None):
if hasattr(models, "SmallAutoField"): if hasattr(models, "SmallAutoField"):
@convert_django_field.register(models.SmallAutoField) @convert_django_field.register(models.SmallAutoField)
def convert_field_to_id(field, registry=None): def convert_field_small_to_id(field, registry=None):
return ID( return convert_field_to_id(field, registry)
description=get_django_field_description(field), required=not field.null
)
@convert_django_field.register(models.UUIDField) @convert_django_field.register(models.UUIDField)