mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-08 14:24:48 +03:00
Limits the number of related items added to the choices dictionary on RelatedField
This commit is contained in:
parent
8264222497
commit
cb29f1ab5e
|
@ -154,7 +154,7 @@ class RelatedField(Field):
|
||||||
six.text_type(self.to_representation(item)),
|
six.text_type(self.to_representation(item)),
|
||||||
self.display_value(item)
|
self.display_value(item)
|
||||||
)
|
)
|
||||||
for item in queryset
|
for item in queryset[:self.html_cutoff]
|
||||||
])
|
])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in New Issue
Block a user