From 92fedd310c390b8bdc4c30a9f0f995d865ae1d14 Mon Sep 17 00:00:00 2001 From: Kraiem Taha Yassine Date: Thu, 23 Nov 2023 15:18:23 +0100 Subject: [PATCH] fix(chalice): fixed delete cards (#1697) --- ee/api/chalicelib/core/custom_metrics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ee/api/chalicelib/core/custom_metrics.py b/ee/api/chalicelib/core/custom_metrics.py index e2a78a165..1d9b3d491 100644 --- a/ee/api/chalicelib/core/custom_metrics.py +++ b/ee/api/chalicelib/core/custom_metrics.py @@ -546,7 +546,8 @@ def delete_card(project_id, metric_id, user_id): SET deleted_at = timezone('utc'::text, now()), edited_at = timezone('utc'::text, now()) WHERE project_id = %(project_id)s AND metric_id = %(metric_id)s - AND (user_id = %(user_id)s OR is_public);""", + AND (user_id = %(user_id)s OR is_public) + RETURNING data;""", {"metric_id": metric_id, "project_id": project_id, "user_id": user_id}) ) # for EE only