amoghrajesh commented on code in PR #57351:
URL: https://github.com/apache/airflow/pull/57351#discussion_r2466032020
##########
providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py:
##########
@@ -223,6 +223,8 @@ def execute(self, context: Context):
if self.fail_when_dag_is_paused:
dag_model = DagModel.get_current(self.trigger_dag_id)
+ if not dag_model:
+ raise AirflowException(f"Dag {self.trigger_dag_id} is not
found")
if dag_model.is_paused:
Review Comment:
Can we just do:
```suggestion
if dag_model is not None and dag_model.is_paused:
```
--
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]