Merge pull request #4998 from COCOLMAN/master

Ensure that pagination is not included in API schema when `page_size=None`.
This commit is contained in:
Tom Christie 2017-03-20 15:32:44 +00:00 committed by GitHub
commit 7d64cf568a

View File

@ -600,7 +600,8 @@ class SchemaGenerator(object):
if not is_list_view(path, method, view): if not is_list_view(path, method, view):
return [] return []
if not getattr(view, 'pagination_class', None): pagination = getattr(view, 'pagination_class', None)
if not pagination or not pagination.page_size:
return [] return []
paginator = view.pagination_class() paginator = view.pagination_class()