This is an automated email from the ASF dual-hosted git repository.
aminghadersohi pushed a commit to branch work-pr-39604
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/work-pr-39604 by this push:
new d2bcd8d5093 fix(mcp): use consistent filter() style for email lookup
in find_user_with_relationships
d2bcd8d5093 is described below
commit d2bcd8d5093f4e4479eba64e0f9165493a653153
Author: Amin Ghadersohi <[email protected]>
AuthorDate: Tue May 26 17:27:58 2026 +0000
fix(mcp): use consistent filter() style for email lookup in
find_user_with_relationships
Use `.filter(self.user_model.email == email)` to match the explicit
column-attribute style used for username lookups in the same method.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---
superset/security/manager.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset/security/manager.py b/superset/security/manager.py
index 10fb388a359..7e4938c2c31 100644
--- a/superset/security/manager.py
+++ b/superset/security/manager.py
@@ -3217,7 +3217,7 @@ class SupersetSecurityManager( # pylint:
disable=too-many-public-methods
return (
self.session.query(self.user_model)
.options(*eager)
- .filter_by(email=email)
+ .filter(self.user_model.email == email)
.one_or_none()
)
except MultipleResultsFound: