Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Properly validate individual checks
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr authored and blizzz committed Oct 29, 2019
commit b15c4a3a2ea0e561ed6e892a77bbb91d9335958b
3 changes: 1 addition & 2 deletions apps/workflowengine/src/components/Check.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export default {
if (this.currentOption && this.currentOption.validate) {
this.valid = !!this.currentOption.validate(this.check);
}
this.$store.dispatch('setValid', { rule: this.rule, valid: this.rule.valid && this.valid })
return this.valid
},
updateCheck() {
Expand All @@ -123,7 +122,7 @@ export default {
this.check.operator = this.currentOperator.operator

if (!this.validate()) {
return
this.check.invalid = !this.valid
}
this.$emit('update', this.check)
}
Expand Down
2 changes: 1 addition & 1 deletion apps/workflowengine/src/components/Rule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default {
return this.$store.getters.getOperationForRule(this.rule)
},
ruleStatus() {
if (this.error || !this.rule.valid) {
if (this.error || !this.rule.valid || this.rule.checks.some((check) => check.invalid === true)) {
return {
title: t('workflowengine', 'The configuration is invalid'),
class: 'icon-close-white invalid',
Expand Down