Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Changed asset event from server to include attributes

Rich Turner9ad24739703c
diff --git a/manager/src/main/java/org/openremote/manager/asset/AssetStorageService.java b/manager/src/main/java/org/openremote/manager/asset/AssetStorageService.java
index 2d3d6df19..71b15dcfc 100644
--- a/manager/src/main/java/org/openremote/manager/asset/AssetStorageService.java
+++ b/manager/src/main/java/org/openremote/manager/asset/AssetStorageService.java
@@ -1615,8 +1615,8 @@ public class AssetStorageService extends RouteBuilder implements ContainerServic
Asset asset = persistenceEvent.getEntity();
switch (persistenceEvent.getCause()) {
case CREATE:
- // Fully load the asset (excluding attributes)
- Asset loadedAsset = find(new AssetQuery().select(Select.selectAll().excludeAttributes(true)).ids(asset.getId()));
+ // Fully load the asset
+ Asset loadedAsset = find(new AssetQuery().select(Select.selectAll()).ids(asset.getId()));
clientEventService.publishEvent(
new AssetEvent(AssetEvent.Cause.CREATE, loadedAsset, null)
@@ -1661,8 +1661,8 @@ public class AssetStorageService extends RouteBuilder implements ContainerServic
return !Objects.equals(oldValue, newValue);
}).toArray(String[]::new);
- // Fully load the asset (excluding attributes)
- loadedAsset = find(new AssetQuery().select(Select.selectAll().excludeAttributes(true)).ids(asset.getId()));
+ // Fully load the asset
+ loadedAsset = find(new AssetQuery().select(Select.selectAll()).ids(asset.getId()));
clientEventService.publishEvent(
new AssetEvent(AssetEvent.Cause.UPDATE, loadedAsset, updatedProperties)