mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
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:
commit
7d64cf568a
|
@ -600,7 +600,8 @@ class SchemaGenerator(object):
|
|||
if not is_list_view(path, method, view):
|
||||
return []
|
||||
|
||||
if not getattr(view, 'pagination_class', None):
|
||||
pagination = getattr(view, 'pagination_class', None)
|
||||
if not pagination or not pagination.page_size:
|
||||
return []
|
||||
|
||||
paginator = view.pagination_class()
|
||||
|
|
Loading…
Reference in New Issue
Block a user