From 1005cb53852fa2ed617f6492c6e590df50bcb5c1 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Sat, 21 May 2022 11:36:50 +0200 Subject: [PATCH] feat(api): fixed custom metrics template --- api/chalicelib/core/dashboards.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/chalicelib/core/dashboards.py b/api/chalicelib/core/dashboards.py index 7b7bfe252..141380ef8 100644 --- a/api/chalicelib/core/dashboards.py +++ b/api/chalicelib/core/dashboards.py @@ -37,6 +37,9 @@ def get_templates(project_id, user_id): for w in r["widgets"]: w["created_at"] = TimeUTC.datetime_to_timestamp(w["created_at"]) w["edited_at"] = TimeUTC.datetime_to_timestamp(w["edited_at"]) + for s in w["series"]: + s["created_at"] = TimeUTC.datetime_to_timestamp(s["created_at"]) + s["filter"] = helper.old_search_payload_to_flat(s["filter"]) return helper.list_to_camel_case(rows)