This commit is contained in:
Chris Adams 2018-04-24 14:20:02 +00:00 committed by GitHub
commit c4397303dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ from __future__ import unicode_literals
import base64 import base64
from collections import OrderedDict from collections import OrderedDict
from warnings import warn
from django import forms from django import forms
from django.conf import settings from django.conf import settings
@ -623,7 +624,8 @@ class BrowsableAPIRenderer(BaseRenderer):
elif paginator is not None and data is not None: elif paginator is not None and data is not None:
try: try:
paginator.get_results(data) paginator.get_results(data)
except (TypeError, KeyError): except (TypeError, KeyError) as exc:
warn('get_filter_form() aborting because pagination failed: %s' % exc)
return return
elif not isinstance(data, list): elif not isinstance(data, list):
return return