Closed theOehrly closed 2 months ago
Type hints in the signature are incorrect.
As per https://github.com/encode/django-rest-framework/blob/fe92f0dd0d4c587eed000c7de611ddbff241bd6a/rest_framework/serializers.py#L707 and manual verification at runtime, ListSerializer.to_representation() takes a list of instances, not a query set.
ListSerializer.to_representation()
Looking at the source code, contrary to the doc string, it might not always be a list. But it certainly isn't a QuerySet,
Why are you making this change?
Type hints in the signature are incorrect.
As per https://github.com/encode/django-rest-framework/blob/fe92f0dd0d4c587eed000c7de611ddbff241bd6a/rest_framework/serializers.py#L707 and manual verification at runtime,
ListSerializer.to_representation()
takes a list of instances, not a query set.Contributing Checklist