dgriffon commented on a change in pull request #365:
URL: https://github.com/apache/unomi/pull/365#discussion_r754171010



##########
File path: 
services/src/main/java/org/apache/unomi/services/impl/rules/RulesServiceImpl.java
##########
@@ -393,6 +408,11 @@ public void setRule(Rule rule) {
                 definitionsService.extractConditionBySystemTag(condition, 
"eventCondition");
             }
         }
+        List<Action> actions = rule.getActions();
+        if (actions == null || actions.isEmpty()) {
+            logger.warn("rule {} won't be saved as it contains no action", 
rule.getItemId());
+            return;
+        }

Review comment:
       you're right, the set should not be modified, let the refresh do the 
work make sense




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to