Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
dotCMS/core#20153 fix rules-deactivating-on-valid-actions (#1689)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredo-dotcms authored Jun 30, 2021
1 parent cf277b7 commit b53547c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/dot-rules/src/lib/rule-engine.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,8 @@ export class RuleEngineContainer implements OnDestroy {
}

patchAction(rule: RuleModel, ruleAction: ActionModel): void {
this.ruleUpdating(rule);
if (ruleAction.isValid()) {
this.ruleUpdating(rule, false);
if (!ruleAction.isPersisted()) {
this._ruleActionService.createRuleAction(rule.key, ruleAction).subscribe(
(_) => {
Expand All @@ -630,6 +630,7 @@ export class RuleEngineContainer implements OnDestroy {
);
}
} else {
this.ruleUpdating(rule);
this.ruleUpdated(rule, {
invalid: 'Cannot save, action is not valid.'
});
Expand Down

0 comments on commit b53547c

Please sign in to comment.