mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 03:20:12 +03:00
Priority display type
This commit is contained in:
parent
78367ba102
commit
f36444e521
|
@ -270,10 +270,10 @@ class AutoSchema(ViewInspector):
|
|||
elif model_field is not None and model_field.primary_key:
|
||||
description = get_pk_description(model, model_field)
|
||||
|
||||
if hasattr(view, 'lookup_value_regex') and view.lookup_field == variable:
|
||||
kwargs['pattern'] = view.lookup_value_regex
|
||||
elif isinstance(model_field, models.AutoField):
|
||||
if isinstance(model_field, (models.IntegerField, models.BigIntegerField, models.AutoField)):
|
||||
schema_cls = coreschema.Integer
|
||||
elif hasattr(view, 'lookup_value_regex') and view.lookup_field == variable:
|
||||
kwargs['pattern'] = view.lookup_value_regex
|
||||
|
||||
field = coreapi.Field(
|
||||
name=variable,
|
||||
|
|
Loading…
Reference in New Issue
Block a user