From 401787efcbd86f1bd7014b11bcb1b3bcab4393f5 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 4 Dec 2023 16:57:17 +0100 Subject: [PATCH] fix(api): usability tests - tasks stats sort --- api/chalicelib/core/db_request_handler.py | 3 --- api/chalicelib/core/usability_testing/service.py | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/api/chalicelib/core/db_request_handler.py b/api/chalicelib/core/db_request_handler.py index 6e31ee450..cfda5eb39 100644 --- a/api/chalicelib/core/db_request_handler.py +++ b/api/chalicelib/core/db_request_handler.py @@ -33,9 +33,6 @@ class DatabaseRequestHandler: def add_param(self, key, value): self.params[key] = value - def set_order_by(self, order_by): - self.order_clause = order_by - def set_sort_by(self, sort_by): self.sort_clause = sort_by diff --git a/api/chalicelib/core/usability_testing/service.py b/api/chalicelib/core/usability_testing/service.py index 86811a2a1..f919febb4 100644 --- a/api/chalicelib/core/usability_testing/service.py +++ b/api/chalicelib/core/usability_testing/service.py @@ -400,6 +400,7 @@ def get_task_statistics(test_id: int): db_handler.add_join("JOIN ut_tests_signals uts ON utt.task_id = uts.task_id") db_handler.add_constraint("utt.test_id = %(test_id)s", {'test_id': test_id}) db_handler.set_group_by("utt.task_id, utt.title") + db_handler.set_sort_by("utt.task_id ASC") rows = db_handler.fetchall()