Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rest_framework_json_api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,6 @@ def format_error_object(message, pointer, response):


def format_errors(data):
if len(data) > 1 and isinstance(data, list):
if isinstance(data, list) and len(data) > 1:
data.sort(key=lambda x: x.get("source", {}).get("pointer", ""))
return {"errors": data}