From 11c69b0d87d0756dafc22689867d1c9ad4a342da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Csord=C3=A1s?= Date: Thu, 8 Nov 2018 10:33:23 +0100 Subject: [PATCH] Fix SQL query Fix SQL query in getRunHistoryTagCounts API function: column "run_histories.time" must appear in the GROUP BY clause or be used in an aggregate function. --- libcodechecker/server/api/report_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcodechecker/server/api/report_server.py b/libcodechecker/server/api/report_server.py index f06e4eb847..dee61a42d6 100644 --- a/libcodechecker/server/api/report_server.py +++ b/libcodechecker/server/api/report_server.py @@ -1764,7 +1764,7 @@ def getRunHistoryTagCounts(self, run_ids, report_filter, cmp_data): .outerjoin(count_q, count_q.c.run_history_id == RunHistory.id) \ .filter(RunHistory.version_tag.isnot(None)) \ - .group_by(tag_q.c.run_history_id) \ + .group_by(tag_q.c.run_history_id, RunHistory.time) \ .order_by(RunHistory.time.desc()) for _, run_name, tag_id, version_time, tag, count in q: