Skip to content

Commit 7140771

Browse files
committed
test fix: reverted previous behaviour for custom validators validation
1 parent 78a1e93 commit 7140771

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scenario-compiler/src/main/scala/pl/touk/nussknacker/engine/compile/ExpressionCompiler.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,10 @@ class ExpressionCompiler(
186186

187187
for {
188188
compiledParams <- allCompiledParams.toIor
189-
_ <- Validations.validateWithCustomValidators(compiledParams, paramValidatorsMap).toIor
189+
customValidatorsResult = Validations.validateWithCustomValidators(compiledParams, paramValidatorsMap)
190+
// We want to accumulate errors from custom validators, but also preserve typing information from allCompiledParams
191+
// even if custom validators return some errors
192+
_ <- customValidatorsResult.toIor.addRight(())
190193
} yield compiledParams
191194
}
192195

0 commit comments

Comments
 (0)