瀏覽代碼

[python] Fix global params bug (#7971)

Devosend 3 年之前
父節點
當前提交
891b5663a8

+ 1 - 1
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,

+ 2 - 2
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"},