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


##########
airflow/operators/subdag.py:
##########
@@ -112,7 +113,7 @@ def _validate_pool(self, session):
             conflicts = [t for t in self.subdag.tasks if t.pool == self.pool]
             if conflicts:
                 # only query for pool conflicts if one may exist
-                pool = session.query(Pool).filter(Pool.slots == 
1).filter(Pool.pool == self.pool).first()
+                pool = session.scalar(select(Pool).where(Pool.slots == 1, 
Pool.pool == self.pool))

Review Comment:
   `Pool.pool` is also unique



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