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


##########
airflow/www/security.py:
##########
@@ -524,10 +524,8 @@ def _merge_perm(self, action_name: str, resource_name: 
str) -> None:
         resource = self.get_resource(resource_name)
         perm = None
         if action and resource:
-            perm = (
-                self.appbuilder.get_session.query(self.permission_model)
-                .filter_by(action=action, resource=resource)
-                .first()
+            perm = self.appbuilder.get_session.scalar(
+                select(self.permission_model).filter_by(action=action, 
resource=resource)

Review Comment:
   But limiting this one is probably a good idea



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