phi-friday commented on issue #41019: URL: https://github.com/apache/airflow/issues/41019#issuecomment-2249662622
I've noticed that if I pass a serialized value as a `json` string instead of a `python` object, I can get the default value. Does the default value for `airflow.Param` only accept `json` strings?  ```python ➜ dags cat render_test.py from __future__ import annotations from airflow.decorators import dag from airflow.models.param import Param from airflow.operators.empty import EmptyOperator from pendulum import datetime @dag( start_date=datetime(2024, 1, 1), schedule=None, catchup=False, params={ "has_default_list": Param( default="[]", items={"type": "string"}, title="Has default list", type="array" ) }, ) def render_test() -> None: EmptyOperator(task_id="empty_task") render_test() ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
