From 891b5663a8464339980208e9d3829394cebf4b24 Mon Sep 17 00:00:00 2001 From: Devosend Date: Fri, 14 Jan 2022 10:41:46 +0800 Subject: [PATCH] [python] Fix global params bug (#7971) --- .../src/pydolphinscheduler/core/process_definition.py | 2 +- .../pydolphinscheduler/tests/core/test_process_definition.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py index 4941a85a00..1c123fc605 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py @@ -195,7 +195,7 @@ class ProcessDefinition(Base): """Return param json base on self.param.""" # Handle empty dict and None value if not self.param: - return None + return [] return [ { "prop": k, diff --git a/dolphinscheduler-python/pydolphinscheduler/tests/core/test_process_definition.py b/dolphinscheduler-python/pydolphinscheduler/tests/core/test_process_definition.py index 694f9e43ba..f51338df52 100644 --- a/dolphinscheduler-python/pydolphinscheduler/tests/core/test_process_definition.py +++ b/dolphinscheduler-python/pydolphinscheduler/tests/core/test_process_definition.py @@ -159,11 +159,11 @@ def test__parse_datetime_not_support_type(val: Any): [ ( None, - None, + [], ), ( {}, - None, + [], ), ( {"key1": "val1"},