From fb87e2cdbea95ed178946f8fd207b6e78d9a60d2 Mon Sep 17 00:00:00 2001 From: Ryan Lane Date: Wed, 23 Jan 2019 14:43:17 -0800 Subject: [PATCH] Case-insensitive sort for credential and service lists (#182) Case-insensitive sort for credential and service lists --- Dockerfile | 3 ++- confidant/routes/v1.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b50f1aee..18c87874 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,8 @@ RUN virtualenv /venv && \ pip install -r piptools_requirements.txt && \ pip install -r requirements.txt -RUN gem install compass && \ +RUN gem install rb-inotify -v 0.9.10 && \ + gem install compass -v 1.0.3 && \ npm install grunt-cli && \ npm install diff --git a/confidant/routes/v1.py b/confidant/routes/v1.py index cb9fedc4..7b160f70 100644 --- a/confidant/routes/v1.py +++ b/confidant/routes/v1.py @@ -83,6 +83,7 @@ def get_service_list(): 'modified_date': service.modified_date, 'modified_by': service.modified_by }) + services = sorted(services, key=lambda k: k['id'].lower()) return jsonify({'services': services}) @@ -359,7 +360,7 @@ def get_credential_list(): 'documentation': cred.documentation }) - credentials = sorted(credentials, key=lambda k: k['name']) + credentials = sorted(credentials, key=lambda k: k['name'].lower()) return jsonify({'credentials': credentials})