diff --git a/api/chalicelib/core/custom_metrics.py b/api/chalicelib/core/custom_metrics.py index 05d729dbe..7d46cc316 100644 --- a/api/chalicelib/core/custom_metrics.py +++ b/api/chalicelib/core/custom_metrics.py @@ -67,7 +67,7 @@ def make_chart(project_id, user_id, metric_id, data: schemas.CustomMetricChartPa if metric is None: return None series_charts = __try_live(project_id=project_id, data=metric) - if metric.view_type == schemas.MetricTimeseriesViewType.progress: + if metric.view_type == schemas.MetricTimeseriesViewType.progress or metric.metric_type == schemas.MetricType.table: return series_charts results = [{}] * len(series_charts[0]) for i in range(len(results)): diff --git a/api/routers/core.py b/api/routers/core.py index 9cf9dfd0c..076ca81f4 100644 --- a/api/routers/core.py +++ b/api/routers/core.py @@ -1091,8 +1091,7 @@ def change_client_password(data: schemas.EditUserPasswordSchema = Body(...), @app.put('/{projectId}/custom_metrics/try', tags=["customMetrics"]) def try_custom_metric(projectId: int, data: schemas.CreateCustomMetricsSchema = Body(...), context: schemas.CurrentContext = Depends(OR_context)): - return {"data": custom_metrics.merged_live - (project_id=projectId, data=data)} + return {"data": custom_metrics.merged_live(project_id=projectId, data=data)} @app.post('/{projectId}/custom_metrics', tags=["customMetrics"])