Skip to content

Commit 605369e

Browse files
committed
Merge pull request #2807 from iorlas/patch-2
Now it is possible to display viewset w/o paginator
2 parents 86e7702 + 548ac9a commit 605369e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/renderers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ def get_context(self, data, accepted_media_type, renderer_context):
611611
renderer_content_type += ' ;%s' % renderer.charset
612612
response_headers['Content-Type'] = renderer_content_type
613613

614-
if hasattr(view, 'paginator') and view.paginator.display_page_controls:
614+
if getattr(view, 'paginator', None) and view.paginator.display_page_controls:
615615
paginator = view.paginator
616616
else:
617617
paginator = None

0 commit comments

Comments
 (0)