From 2b3f400fe8d19ac3a994b4e303f819fe0946a6f0 Mon Sep 17 00:00:00 2001 From: Alessio Del Conte Date: Fri, 17 Jan 2025 14:24:43 +0100 Subject: [PATCH] Update the jobs flag sorting --- drmaatic/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drmaatic/utils.py b/drmaatic/utils.py index ae1e648..ec563bb 100644 --- a/drmaatic/utils.py +++ b/drmaatic/utils.py @@ -31,8 +31,7 @@ def format_value(value, param_type): def format_job_params(passed_params: List[JobParameter]): formatted_params = [] # Filter the parameters that are not supposed to go to the script,1 flag to_script = False - passed_params = list( - sorted(passed_params, key=lambda param: param.param.flag if param.param.flag else 0, reverse=False)) + passed_params = list(sorted(passed_params, key=lambda param: param.param.flag, reverse=False)) for passed_param in passed_params: if passed_param.param.flag: # If the param is of type Bool and is positive, no value has to be passed, only the flag