Skip to content

Commit 72da733

Browse files
committed
SchemaGenerator: Avoid crashing with pagesizeless paginators
1 parent bd768d6 commit 72da733

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/schemas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ def get_pagination_fields(self, path, method, view):
604604
return []
605605

606606
pagination = getattr(view, 'pagination_class', None)
607-
if not pagination or not pagination.page_size:
607+
if not pagination or not getattr(pagination, 'page_size', None):
608608
return []
609609

610610
paginator = view.pagination_class()

0 commit comments

Comments
 (0)