Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Jan N. Klug <[email protected]>
  • Loading branch information
J-N-K committed Jul 22, 2023
1 parent 15659e5 commit 91dc7fc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ public void modelChanged(String modelFileName, EventType type) {
int index = 1;
for (org.openhab.core.model.rule.rules.Rule rule : ruleModel.getRules()) {
Rule newRule = toRule(ruleModelName, rule, index);
Rule oldRule = rules.get(ruleModelName);
Rule oldRule = rules.remove(ruleModelName);
rules.put(newRule.getUID(), newRule);
xExpressions.put(ruleModelName + "-" + index, rule.getScript());
modelRules.add(new ModelRulePair(newRule, oldRule));
index++;
Expand Down

0 comments on commit 91dc7fc

Please sign in to comment.