You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/25 21:40:09 UTC

[GitHub] [airflow] rustikk commented on a change in pull request #21809: Default args type check

rustikk commented on a change in pull request #21809:
URL: https://github.com/apache/airflow/pull/21809#discussion_r815172324



##########
File path: airflow/models/baseoperator.py
##########
@@ -135,7 +135,10 @@ def _get_dag_defaults(dag: Optional["DAG"], task_group: Optional["TaskGroup"]) -
     dag_args = copy.copy(dag.default_args)
     dag_params = copy.deepcopy(dag.params)
     if task_group:
-        dag_args.update(task_group.default_args)
+        if not isinstance(task_group.default_args, Dict) and task_group.default_args is not None:
+            raise TypeError("default_args must be a dictionary")
+        else:
+            dag_args.update(task_group.default_args)

Review comment:
       @uranusjr good to know thank you for reviewing this.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org