Skip to content

Commit

Permalink
check if default_args key exist
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajastro committed Jan 3, 2025
1 parent 5add203 commit ec07050
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dagfactory/dagfactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ def build_dags(self) -> Dict[str, DAG]:
default_config: Dict[str, Any] = self.get_default_config()

if global_default_args is not None:
default_config = {"default_args": {**global_default_args["default_args"], **default_config["default_args"]}}
if "default_args" in default_config and "default_args" in global_default_args:
default_config = {
"default_args": {**global_default_args["default_args"], **default_config["default_args"]}
}

dags: Dict[str, Any] = {}

Expand Down

0 comments on commit ec07050

Please sign in to comment.