mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 10:03:57 +03:00
Change pagination to update Serializer.serialize_fields
This commit is contained in:
parent
8b0561c57e
commit
e03bb9c2fe
|
@ -62,7 +62,7 @@ class BasePaginationSerializer(serializers.Serializer):
|
|||
super(BasePaginationSerializer, self).__init__(*args, **kwargs)
|
||||
results_field = self.results_field
|
||||
object_serializer = self.opts.object_serializer_class
|
||||
self.fields[results_field] = object_serializer(source='object_list')
|
||||
self.serialize_fields[results_field] = object_serializer(source='object_list')
|
||||
|
||||
def to_native(self, obj):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user