diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index 9475e119bd2..4dd26412a81 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -562,7 +562,7 @@ def to_representation(self, data): """ # 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) else data + iterable = data.all() if isinstance(data, (models.Manager, models.QuerySet)) else data return [ self.child.to_representation(item) for item in iterable ]