Skip to content
Snippets Groups Projects
Commit 2bf8773b authored by Alex Wiens's avatar Alex Wiens
Browse files

Prule: Fix scalar rule value

parent d049328a
No related branches found
No related tags found
No related merge requests found
......@@ -1162,6 +1162,7 @@ def rule_evaluate(rule: dict, rinput: dict, job_meta: dict, check_requirements:
scalar_tmp = scalar_tmp.magnitude
if len(scalar_tmp) == 1:
scalar_tmp = float(scalar_tmp)
output["scalar"] = scalar_tmp
else:
error = True
error_msg = "Error on converting scalar output value {} for rule {}: multiple values: {} in variable of type {}".format(rule["output_scalar"], rule["name"], len(scalar_tmp), type(scalar_tmp))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment