Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix possible sort error in build_response (#68)
It seems that under certain circumstances, the list of errors can contain both located and unlocated errors, in which case using `locations` and `path` as sort key can fail, since in Python 3 you cannot compare a list with None. This fix makes sure that we always compare lists. The `path` can actually contain both int and str values, which cannot be compared either, but different types should not appear in a path where all parts of the path before are equal, which would be the only problematic case when sorting. So adding the path to the sort key should be safe.
- Loading branch information