You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/09/14 03:55:22 UTC
[GitHub] [airflow] uranusjr commented on a diff in pull request #34350: Refactor shorter defaults
uranusjr commented on code in PR #34350:
URL: https://github.com/apache/airflow/pull/34350#discussion_r1325323456
##########
airflow/api/common/trigger_dag.py:
##########
@@ -54,7 +54,8 @@ def _trigger_dag(
if dag is None or dag_id not in dag_bag.dags:
raise DagNotFound(f"Dag id {dag_id} not found")
- execution_date = execution_date if execution_date else timezone.utcnow()
+ if execution_date is None:
+ execution_date = timezone.utcnow()
Review Comment:
Would `execution_date = execution_date or timezone.utcnow()` work?
--
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