mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-08 06:14:47 +03:00
Merge 9edf3245b0
into 3e1687282b
This commit is contained in:
commit
ba5faa54c6
|
@ -388,7 +388,7 @@ class ManyRelatedField(Field):
|
|||
|
||||
@property
|
||||
def choices(self):
|
||||
queryset = self.child_relation.queryset
|
||||
queryset = self.child_relation.queryset or []
|
||||
iterable = queryset.all() if (hasattr(queryset, 'all')) else queryset
|
||||
items_and_representations = [
|
||||
(item, self.child_relation.to_representation(item))
|
||||
|
|
Loading…
Reference in New Issue
Block a user