Don't sort error messages.
This should make it easier to return more complex error structures. It also doesn't appear to matter - tests still pass without changes.
This commit is contained in:
parent
d0e2c2308a
commit
4c3f93e329
@ -1090,7 +1090,6 @@ def v0_api(api):
|
|||||||
# Sort all the results by case-insensitive blueprint name
|
# Sort all the results by case-insensitive blueprint name
|
||||||
changes = sorted(changes, key=lambda c: c["name"].lower())
|
changes = sorted(changes, key=lambda c: c["name"].lower())
|
||||||
blueprints = sorted(blueprints, key=lambda r: r["name"].lower())
|
blueprints = sorted(blueprints, key=lambda r: r["name"].lower())
|
||||||
errors = sorted(errors, key=lambda e: e.lower())
|
|
||||||
|
|
||||||
if out_fmt == "toml":
|
if out_fmt == "toml":
|
||||||
# With TOML output we just want to dump the raw blueprint, skipping the rest.
|
# With TOML output we just want to dump the raw blueprint, skipping the rest.
|
||||||
@ -1131,7 +1130,6 @@ def v0_api(api):
|
|||||||
blueprints.append({"name":blueprint_name, "changes":commits, "total":len(commits)})
|
blueprints.append({"name":blueprint_name, "changes":commits, "total":len(commits)})
|
||||||
|
|
||||||
blueprints = sorted(blueprints, key=lambda r: r["name"].lower())
|
blueprints = sorted(blueprints, key=lambda r: r["name"].lower())
|
||||||
errors = sorted(errors, key=lambda e: e.lower())
|
|
||||||
|
|
||||||
return jsonify(blueprints=blueprints, errors=errors, offset=offset, limit=limit)
|
return jsonify(blueprints=blueprints, errors=errors, offset=offset, limit=limit)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user