Skip to content

Commit 75be919

Browse files
committed
Allow AdminRenderer to function when pagination is disabled. Closes encode#3275.
1 parent d86fd67 commit 75be919

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
@@ -737,7 +737,7 @@ def get_context(self, data, accepted_media_type, renderer_context):
737737
if (paginator is not None and data is not None):
738738
try:
739739
results = paginator.get_results(data)
740-
except KeyError:
740+
except (TypeError, KeyError):
741741
results = data
742742
else:
743743
results = data

0 commit comments

Comments
 (0)