From 12ed99573ff946ad7365a7dbbf9fda73587c8271 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 27 Apr 2026 10:53:14 +0800 Subject: [PATCH] fix(dashboard): Fix the issue where the predicted data cannot be displayed on the data dashboard --- backend/apps/dashboard/crud/dashboard_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apps/dashboard/crud/dashboard_service.py b/backend/apps/dashboard/crud/dashboard_service.py index c9c83650..ff33f835 100644 --- a/backend/apps/dashboard/crud/dashboard_service.py +++ b/backend/apps/dashboard/crud/dashboard_service.py @@ -50,7 +50,7 @@ def load_resource(session: SessionDep, dashboard: QueryDashboard): result_dict = dict(result) canvas_view_obj = orjson.loads(result_dict['canvas_view_info']) for item in canvas_view_obj.values(): - if all(key in item for key in ['datasource', 'sql']) and item['datasource'] is not None: + if all(key in item for key in ['datasource', 'sql']) and item['datasource'] is not None and item['sql'] is not None: data_result = get_chart_data_ds(session, item['datasource'], item['sql']) item['data']['data'] = data_result['data'] item['status'] = data_result['status']