mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 19:40:13 +03:00
Merge 18d8f818e0
into 76672787cd
This commit is contained in:
commit
dc0f6a84e8
|
@ -520,7 +520,7 @@ class BaseSerializer(WritableField):
|
||||||
if self.many is not None:
|
if self.many is not None:
|
||||||
many = self.many
|
many = self.many
|
||||||
else:
|
else:
|
||||||
many = hasattr(obj, '__iter__') and not isinstance(obj, (Page, dict))
|
many = hasattr(obj, '__iter__') and not (isinstance(obj, dict) or hasattr(obj, 'next_page_number'))
|
||||||
if many:
|
if many:
|
||||||
warnings.warn('Implict list/queryset serialization is deprecated. '
|
warnings.warn('Implict list/queryset serialization is deprecated. '
|
||||||
'Use the `many=True` flag when instantiating the serializer.',
|
'Use the `many=True` flag when instantiating the serializer.',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user