diff --git a/gxformat2/converter.py b/gxformat2/converter.py index e9ad94a..cda6186 100644 --- a/gxformat2/converter.py +++ b/gxformat2/converter.py @@ -36,7 +36,7 @@ 'hide': { 'action_class': "HideDatasetAction", 'default': False, - 'arguments': lambda x: x, + 'arguments': lambda x: {}, }, 'rename': { 'action_class': 'RenameDatasetAction', @@ -46,7 +46,7 @@ 'delete_intermediate_datasets': { 'action_class': 'DeleteIntermediatesAction', 'default': False, - 'arguments': lambda x: x, + 'arguments': lambda x: {}, }, 'change_datatype': { 'action_class': 'ChangeDatatypeAction', diff --git a/tests/test_post_job_action_import.py b/tests/test_post_job_action_import.py index 4c90f8f..cf725ae 100644 --- a/tests/test_post_job_action_import.py +++ b/tests/test_post_job_action_import.py @@ -69,14 +69,14 @@ def test_post_job_action_to_native(wf_template): expected_value = {'tags': 'tag'} elif isinstance(default_value, bool): action_value = 'true' - expected_value = True + expected_value = {} workflow_yaml = wf_template.format(action=action_key, action_value=action_value) native = to_native(workflow_yaml) pja_class = POST_JOB_ACTIONS[action_key]['action_class'] expected_pja = {pja_class + 'out_file1': OrderedDict([ ("output_name", "out_file1"), ("action_type", pja_class), - ("action_arguments", expected_value or action_value), + ("action_arguments", expected_value if expected_value is not None else action_value), ])} expected_pja = json.dumps(expected_pja, sort_keys=True) converted_pjas = json.dumps(native['steps']['1']['post_job_actions'], sort_keys=True)