mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[PR #21010] [MERGED] perf: replace double lookup with single JOIN in authenticate_user_by_email #129541
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21010
Author: @Classic298
Created: 1/28/2026
Status: ✅ Merged
Merged: 1/30/2026
Merged by: @tjbck
Base:
dev← Head:user-join📝 Commits (2)
e90752bperf: replace double lookup with single JOIN in authenticate_user_by_email81d309bUpdate auths.py📊 Changes
1 file changed (+12 additions, -5 deletions)
View changed files
📝
backend/open_webui/models/auths.py(+12 -5)📄 Description
Summary
Eliminates double database lookup in authenticate_user_by_email. Previously, the function queried the Auth table first, then fetched the User separately.
Changes
models/auths.py authenticate_user_by_email:
Performance Impact
Before: 2 queries (Auth lookup + User lookup)
After: 1 query using SQL JOIN
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.