mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
fix: db
This commit is contained in:
parent
2aa5d26735
commit
ebcc5be1bf
2 changed files with 2 additions and 2 deletions
|
|
@ -159,7 +159,7 @@ class AuthsTable:
|
|||
log.info(f"authenticate_user_by_trusted_header: {email}")
|
||||
try:
|
||||
with get_db() as db:
|
||||
auth = db.query(Auth).filter(email=email, active=True).first()
|
||||
auth = db.query(Auth).filter_by(email=email, active=True).first()
|
||||
if auth:
|
||||
user = Users.get_user_by_id(auth.id)
|
||||
return user
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ class TagTable:
|
|||
) -> Optional[TagModel]:
|
||||
try:
|
||||
with get_db() as db:
|
||||
tag = db.query(Tag).filter(name=name, user_id=user_id).first()
|
||||
tag = db.query(Tag).filter_by(name=name, user_id=user_id).first()
|
||||
return TagModel.model_validate(tag)
|
||||
except Exception as e:
|
||||
return None
|
||||
|
|
|
|||
Loading…
Reference in a new issue