mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-25 23:50:01 +03:00
Change to only BaseManager
This commit is contained in:
parent
e52d4e8209
commit
61becb6bc6
|
@ -681,9 +681,7 @@ class ListSerializer(BaseSerializer):
|
|||
"""
|
||||
# Dealing with nested relationships, data can be a Manager,
|
||||
# so, first get a queryset from the Manager if needed
|
||||
iterable = data.all() if isinstance(data, (
|
||||
models.manager.Manager, models.manager.BaseManager
|
||||
)) else data
|
||||
iterable = data.all() if isinstance(data, models.manager.BaseManager) else data
|
||||
|
||||
return [
|
||||
self.child.to_representation(item) for item in iterable
|
||||
|
|
Loading…
Reference in New Issue
Block a user