From 46f6b61928bee96eefb714ded4ce3d034e1036bc Mon Sep 17 00:00:00 2001 From: pablohashescobar <118773738+pablohashescobar@users.noreply.github.com> Date: Wed, 15 Mar 2023 23:24:55 +0530 Subject: [PATCH] refactor: grouper function to fix priority keys (#415) --- apiserver/plane/utils/grouper.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apiserver/plane/utils/grouper.py b/apiserver/plane/utils/grouper.py index 798b652fa..535bf6eba 100644 --- a/apiserver/plane/utils/grouper.py +++ b/apiserver/plane/utils/grouper.py @@ -27,6 +27,15 @@ def group_results(results_data, group_by): """ response_dict = dict() + if group_by == "priority": + response_dict = { + "urgent": [], + "high": [], + "medium": [], + "low": [], + "None": [], + } + for value in results_data: group_attribute = resolve_keys(group_by, value) if isinstance(group_attribute, list):