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