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


##########
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:
   Since we can only delete pools that actually exist in the database , could 
we simply iterate over matched_pool_names for all non-FAIL cases.



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