mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-03-03 19:00:17 +03:00
fix for python3
This commit is contained in:
parent
316de3a8a3
commit
7fb3f078f0
|
@ -212,12 +212,15 @@ class GenericAPIView(views.APIView):
|
|||
except (KeyError, ValueError):
|
||||
pass
|
||||
else:
|
||||
if self.max_paginate_by:
|
||||
if self.max_paginate_by is not None:
|
||||
return min(self.max_paginate_by, paginate_by_param)
|
||||
else:
|
||||
return paginate_by_param
|
||||
|
||||
return min(self.max_paginate_by, self.paginate_by) or self.paginate_by
|
||||
if self.max_paginate_by:
|
||||
return min(self.max_paginate_by, self.paginate_by)
|
||||
else:
|
||||
return self.paginate_by
|
||||
|
||||
def get_serializer_class(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user