feat(chalice): changed custom_metrics

This commit is contained in:
Taha Yassine Kraiem 2022-11-28 12:15:03 +01:00
parent ad11ba4d06
commit b60251a0cc

View file

@ -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