mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-04-28 13:03:45 +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):
|
except (KeyError, ValueError):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
if self.max_paginate_by:
|
if self.max_paginate_by is not None:
|
||||||
return min(self.max_paginate_by, paginate_by_param)
|
return min(self.max_paginate_by, paginate_by_param)
|
||||||
else:
|
else:
|
||||||
return paginate_by_param
|
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):
|
def get_serializer_class(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user