From fd121d5db1d20b5f8ef3812522933ca1415400a8 Mon Sep 17 00:00:00 2001 From: Pavel Gnedov Date: Fri, 2 Feb 2024 07:59:16 +0700 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=BF=D1=83=D1=81=D1=82=D1=8B=D1=85=20=D0=B4?= =?UTF-8?q?=D0=B0=D1=88=D0=B1=D0=BE=D1=80=D0=B4=D0=BE=D0=B2=20=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=BF=D0=BE=D0=BB=D0=BD=D0=BE=D1=81=D1=82=D1=8C=D1=8E?= =?UTF-8?q?=20=D1=81=D0=B2=D1=91=D1=80=D0=BD=D1=83=D1=82=D1=8B=D1=85=20?= =?UTF-8?q?=D0=B8=D0=B7=D0=BD=D0=B0=D1=87=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/event-emitter/src/dashboards/dashboards-data.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/event-emitter/src/dashboards/dashboards-data.service.ts b/libs/event-emitter/src/dashboards/dashboards-data.service.ts index f240bd1..0ba0ddb 100644 --- a/libs/event-emitter/src/dashboards/dashboards-data.service.ts +++ b/libs/event-emitter/src/dashboards/dashboards-data.service.ts @@ -22,6 +22,7 @@ export class DashboardsDataService { const cfg = await this.dashboardsService.load(id); const results: WidgetWithData[] = []; let isSuccess = false; + let counter = 0; if (!cfg?.widgets || cfg?.widgets?.length <= 0) { return results; } @@ -35,12 +36,13 @@ export class DashboardsDataService { cfg, ); if (loadRes.result) { + counter++; isSuccess = true; loadRes.result.widgetId = widget.id; results.push({ data: loadRes.result, widgetId: widget.id }); } } - if (!isSuccess) throw createAppError('CANNOT_LOAD_DATA'); + if (!isSuccess && counter > 0) throw createAppError('CANNOT_LOAD_DATA'); return results; }