From 72da73310d6da11e4beeba815498fa4aecc6635a Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Wed, 19 Apr 2017 09:43:28 +0300 Subject: [PATCH] SchemaGenerator: Avoid crashing with pagesizeless paginators --- rest_framework/schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/schemas.py b/rest_framework/schemas.py index ec6d7f3c3..52e14759f 100644 --- a/rest_framework/schemas.py +++ b/rest_framework/schemas.py @@ -604,7 +604,7 @@ class SchemaGenerator(object): return [] pagination = getattr(view, 'pagination_class', None) - if not pagination or not pagination.page_size: + if not pagination or not getattr(pagination, 'page_size', None): return [] paginator = view.pagination_class()