Merge pull request #5086 from valohai/limit-offset-pagination-schema

SchemaGenerator: Avoid crashing with pagesizeless paginators
This commit is contained in:
Tom Christie 2017-04-27 16:57:28 +01:00 committed by GitHub
commit 5e5fd67899

View File

@ -604,7 +604,7 @@ class SchemaGenerator(object):
return [] return []
pagination = getattr(view, 'pagination_class', None) 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 [] return []
paginator = view.pagination_class() paginator = view.pagination_class()