ColtenOuO commented on code in PR #66222:
URL: https://github.com/apache/airflow/pull/66222#discussion_r3178050311


##########
airflow-core/src/airflow/api_fastapi/core_api/services/public/pools.py:
##########
@@ -202,7 +204,7 @@ def handle_bulk_delete(self, action: 
BulkDeleteAction[PoolBody], results: BulkAc
                 delete_pool_names = to_delete_pool_names
 
             for pool_name in delete_pool_names:
-                existing_pool = 
self.session.scalar(select(Pool).where(Pool.pool == pool_name).limit(1))
+                existing_pool = existing_pools_dict.get(pool_name)
                 if existing_pool:

Review Comment:
   I missed that as well. It definitely makes sense to iterate over 
`matched_pool_names` directly to remove the unnecessary check.
   
   I have squashed the updates into the initial commit. Please let me know if 
you have any further suggestions! Thanks!



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