Commit 0ef4a40375a7ac21ae38543bb3089ec482499393

Authored by Artem Halushko
1 parent 9479b419

entity save fix#3

@@ -183,14 +183,14 @@ export class MapWidgetController implements MapWidgetInterface { @@ -183,14 +183,14 @@ export class MapWidgetController implements MapWidgetInterface {
183 } 183 }
184 } 184 }
185 }); 185 });
186 - if (attributes.length) { 186 + if (timeseries.length) {
187 attributeService.saveEntityTimeseries( 187 attributeService.saveEntityTimeseries(
188 entityId, 188 entityId,
189 LatestTelemetry.LATEST_TELEMETRY, 189 LatestTelemetry.LATEST_TELEMETRY,
190 timeseries 190 timeseries
191 ).subscribe(() => { }); 191 ).subscribe(() => { });
192 } 192 }
193 - if (timeseries.length) { 193 + if (attributes.length) {
194 attributeService.saveEntityAttributes( 194 attributeService.saveEntityAttributes(
195 entityId, 195 entityId,
196 AttributeScope.SERVER_SCOPE, 196 AttributeScope.SERVER_SCOPE,