diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-11-13 20:35:12 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-11-13 20:35:12 +0100 |
commit | bcb3b6c21b84d8d4e24d33aa92aff9b6fa31e285 (patch) | |
tree | 30421f2e60f632801dd396e650ee7ec401b2820c /ick2/controllerapi.py | |
parent | 479855edca8b8dedecb99826405e86b8864a8c92 (diff) | |
download | ick2-bcb3b6c21b84d8d4e24d33aa92aff9b6fa31e285.tar.gz |
Fix: sort list of returned builds
Diffstat (limited to 'ick2/controllerapi.py')
-rw-r--r-- | ick2/controllerapi.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ick2/controllerapi.py b/ick2/controllerapi.py index a9a97e9..fd68a84 100644 --- a/ick2/controllerapi.py +++ b/ick2/controllerapi.py @@ -246,6 +246,13 @@ class BuildsAPI(ResourceApiBase): # pragma: no cover def update(self, body, name): # pragma: no cover raise MethodNotAllowed('Updating builds directly is not allowed') + def list(self): + result = super().list() + items = result[self._type_name] + items.sort(key=lambda x: x.get('build_id')) + result[self._type_name] = items + return result + class LogAPI(ResourceApiBase): # pragma: no cover |