Commit 07a4cfa
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.1 parent a128ee0 commit 07a4cfa
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
| |||
0 commit comments