Skip to content

armgit / core

Public Imported from GitHub
0

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

Bug fix for Notification target

Rich Turnerb20ef88cf251
diff --git a/manager/src/main/java/org/openremote/manager/rules/JsonRulesBuilder.java b/manager/src/main/java/org/openremote/manager/rules/JsonRulesBuilder.java
index f1c5921aa..e3116fc59 100644
--- a/manager/src/main/java/org/openremote/manager/rules/JsonRulesBuilder.java
+++ b/manager/src/main/java/org/openremote/manager/rules/JsonRulesBuilder.java
@@ -781,10 +781,10 @@ public class JsonRulesBuilder extends RulesBuilder {
Collection<String> ids = getRuleActionTargetIds(ruleAction.target, useUnmatched, ruleState, assetsFacade, usersFacade, facts);
if (ids == null) {
- notificationAction.notification.setTargets((List<Notification.Target>)null);
+ notification.setTargets((List<Notification.Target>)null);
} else {
Notification.TargetType finalTargetType = targetType;
- notificationAction.notification.setTargets(ids.stream().map(id -> new Notification.Target(finalTargetType, id)).collect(Collectors.toList()));
+ notification.setTargets(ids.stream().map(id -> new Notification.Target(finalTargetType, id)).collect(Collectors.toList()));
}
log(Level.FINE, "Sending notification for rule action: " + rule.name + " '" + actionsName + "' action index " + index);