From 0ef4a40375a7ac21ae38543bb3089ec482499393 Mon Sep 17 00:00:00 2001 From: Artem Halushko Date: Tue, 28 Apr 2020 15:21:36 +0300 Subject: [PATCH] entity save fix#3 --- .../modules/home/components/widget/lib/maps/map-widget2.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget2.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget2.ts index 83568b8b9a..4254b2d765 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget2.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget2.ts @@ -183,14 +183,14 @@ export class MapWidgetController implements MapWidgetInterface { } } }); - if (attributes.length) { + if (timeseries.length) { attributeService.saveEntityTimeseries( entityId, LatestTelemetry.LATEST_TELEMETRY, timeseries ).subscribe(() => { }); } - if (timeseries.length) { + if (attributes.length) { attributeService.saveEntityAttributes( entityId, AttributeScope.SERVER_SCOPE,