guan404ming commented on code in PR #61833:
URL: https://github.com/apache/airflow/pull/61833#discussion_r2813130623


##########
airflow-core/src/airflow/models/backfill.py:
##########
@@ -502,6 +510,14 @@ def _create_backfill(
         if not serdag:
             raise DagNotFound(f"Could not find dag {dag_id}")
 
+        dag_model = session.scalar(select(DagModel).where(DagModel.dag_id == 
dag_id).limit(1))

Review Comment:
   Yes, I found that we could reused the already-fetched `dag_model` to check 
`dag_model.timetable_summary` == "None" instead of a separate 
`select(func.count())` query. Combined into one if `dag_model:` block with both 
checks.



-- 
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]

Reply via email to