uranusjr commented on code in PR #31772:
URL: https://github.com/apache/airflow/pull/31772#discussion_r1231967451


##########
airflow/models/dag.py:
##########
@@ -3453,12 +3474,11 @@ def get_paused_dag_ids(dag_ids: list[str], session: 
Session = NEW_SESSION) -> se
         :param session: ORM Session
         :return: Paused Dag_ids
         """
-        paused_dag_ids = (
-            session.query(DagModel.dag_id)
-            .filter(DagModel.is_paused == expression.true())
-            .filter(DagModel.dag_id.in_(dag_ids))
-            .all()
-        )
+        paused_dag_ids = session.execute(
+            select(DagModel.dag_id)
+            .where(DagModel.is_paused == expression.true())
+            .where(DagModel.dag_id.in_(dag_ids))
+        ).all()

Review Comment:
   ```suggestion
           )
   ```
   
   I think Mypy would complain here though since `paused_dag_ids` changes type 
in the next line.



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