diff options
| author | Alexander Akhmetov | 2013-08-27 17:38:41 +0400 | 
|---|---|---|
| committer | Alexander Akhmetov | 2013-08-27 17:42:10 +0400 | 
| commit | 7fb3f078f0973acc1d108d8c617b26b6845599f7 (patch) | |
| tree | 27ac7623ae15ea81501a467d289acf97a966a521 /rest_framework/generics.py | |
| parent | 316de3a8a314162e3d6ec081344eabca3a4d91b9 (diff) | |
| download | django-rest-framework-7fb3f078f0973acc1d108d8c617b26b6845599f7.tar.bz2 | |
fix for python3
Diffstat (limited to 'rest_framework/generics.py')
| -rw-r--r-- | rest_framework/generics.py | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/rest_framework/generics.py b/rest_framework/generics.py index 33affee8..ce6c462a 100644 --- a/rest_framework/generics.py +++ b/rest_framework/generics.py @@ -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):          """ | 
