SchemaGenerator: Avoid crashing with pagesizeless paginators

This commit is contained in:
Aarni Koskela 2017-04-19 09:43:28 +03:00
parent bd768d6253
commit 72da73310d

View File

@ -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()