From 0c7aee1f958f87240a4202f389a602dbb87b99a1 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Tue, 24 Jan 2023 16:54:09 +0100 Subject: [PATCH] feat(chalice): fixed get card --- ee/api/chalicelib/core/custom_metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/api/chalicelib/core/custom_metrics.py b/ee/api/chalicelib/core/custom_metrics.py index b01c73769..e93792aa7 100644 --- a/ee/api/chalicelib/core/custom_metrics.py +++ b/ee/api/chalicelib/core/custom_metrics.py @@ -484,7 +484,7 @@ def get_card(metric_id, project_id, user_id, flatten=True, include_data: bool = f"""SELECT metric_id, project_id, user_id, name, is_public, created_at, deleted_at, edited_at, metric_type, view_type, metric_of, metric_value, metric_format, is_pinned, predefined_key, default_config, thumbnail, default_config AS config, - series, dashboards, owner_email, {',data' if include_data else ''} + series, dashboards, owner_email {',data' if include_data else ''} FROM metrics LEFT JOIN LATERAL (SELECT COALESCE(jsonb_agg(metric_series.* ORDER BY index),'[]'::jsonb) AS series FROM metric_series