pierrejeambrun commented on code in PR #46390:
URL: https://github.com/apache/airflow/pull/46390#discussion_r1943189358


##########
airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -362,16 +362,19 @@ def trigger_dag_run(
                 end=pendulum.instance(body.data_interval_end),
             )
         else:
-            data_interval = 
dag.timetable.infer_manual_data_interval(run_after=logical_date)
+            data_interval = dag.timetable.infer_manual_data_interval(
+                run_after=logical_date or pendulum.now("UTC")
+            )
 
-        if body.dag_run_id:
-            run_id = body.dag_run_id
-        else:
-            run_id = dag.timetable.generate_run_id(
+        run_id = (
+            body.dag_run_id
+            if body.dag_run_id
+            else dag.timetable.generate_run_id(

Review Comment:
   I don't think `body.dag_run_id` can ever be none. It's automatically 
validated and provided a value if `if not self.dag_run_id:` via 
`DagRun.generate_run_id(` in the datamodel.



-- 
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-unsubscr...@airflow.apache.org

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

Reply via email to