mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
[automation] Correctly return the evaluation result of DSL scripts
Fixes #1946 Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
+1
-2
@@ -122,11 +122,10 @@ public class DSLScriptEngine implements javax.script.ScriptEngine {
|
||||
s = scriptEngine.newScriptFromString(script);
|
||||
}
|
||||
IEvaluationContext evalContext = createEvaluationContext(s, specificContext);
|
||||
s.execute(evalContext);
|
||||
return s.execute(evalContext);
|
||||
} catch (ScriptExecutionException | ScriptParsingException e) {
|
||||
throw new ScriptException(e.getMessage(), modelName, -1);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private DefaultEvaluationContext createEvaluationContext(Script script, IEvaluationContext specificContext) {
|
||||
|
||||
Reference in New Issue
Block a user