From 6c3b0b3cd2bfc574932e8b53f1bddd59173a669e Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Tue, 7 Aug 2018 15:27:58 -0400 Subject: [PATCH] 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. (cherry picked from commit 4c3f93e3295fc4f90aab1ef36a29b72177fc4407) --- src/pylorax/api/v0.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pylorax/api/v0.py b/src/pylorax/api/v0.py index d357d629..d77764f3 100644 --- a/src/pylorax/api/v0.py +++ b/src/pylorax/api/v0.py @@ -1089,7 +1089,6 @@ def v0_api(api): # Sort all the results by case-insensitive blueprint name changes = sorted(changes, key=lambda c: c["name"].lower()) blueprints = sorted(blueprints, key=lambda r: r["name"].lower()) - errors = sorted(errors, key=lambda e: e.lower()) if out_fmt == "toml": # With TOML output we just want to dump the raw blueprint, skipping the rest. @@ -1130,7 +1129,6 @@ def v0_api(api): blueprints.append({"name":blueprint_name, "changes":commits, "total":len(commits)}) 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)