From b60251a0cc4e38252b61cf64d8c38afdff0dc129 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Mon, 28 Nov 2022 12:15:03 +0100 Subject: [PATCH] feat(chalice): changed custom_metrics --- api/chalicelib/core/custom_metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/chalicelib/core/custom_metrics.py b/api/chalicelib/core/custom_metrics.py index 743ca41e5..46b66b907 100644 --- a/api/chalicelib/core/custom_metrics.py +++ b/api/chalicelib/core/custom_metrics.py @@ -394,7 +394,7 @@ def get(metric_id, project_id, user_id, flatten=True): with pg_client.PostgresClient() as cur: cur.execute( cur.mogrify( - """SELECT * + """SELECT *, default_config AS config FROM metrics LEFT JOIN LATERAL (SELECT COALESCE(jsonb_agg(metric_series.* ORDER BY index),'[]'::jsonb) AS series FROM metric_series