We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cfad80 commit 377a018Copy full SHA for 377a018
rest_framework_json_api/renderers.py
@@ -47,7 +47,7 @@ def render(self, data, accepted_media_type=None, renderer_context=None):
47
48
# If this is an error response, skip the rest.
49
if resource_name == 'errors':
50
- if len(data) > 1:
+ if len(data) > 1 and isinstance(data, list):
51
data.sort(key=lambda x: x.get('source', {}).get('pointer', ''))
52
return super(JSONRenderer, self).render(
53
{resource_name: data}, accepted_media_type, renderer_context
0 commit comments