Showing
1 changed file
with
2 additions
and
2 deletions
@@ -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, |