Commit 320e6585 authored by Jonathan Rohde's avatar Jonathan Rohde
Browse files

feat(sqlalchemy): cleanup fixes

parent 070d9083
...@@ -24,9 +24,7 @@ async def connect(sid, environ, auth): ...@@ -24,9 +24,7 @@ async def connect(sid, environ, auth):
data = decode_token(auth["token"]) data = decode_token(auth["token"])
if data is not None and "id" in data: if data is not None and "id" in data:
from apps.webui.internal.db import SessionLocal user = Users.get_user_by_id(data["id"])
user = Users.get_user_by_id(SessionLocal(), data["id"])
if user: if user:
SESSION_POOL[sid] = user.id SESSION_POOL[sid] = user.id
......
...@@ -751,7 +751,6 @@ class PipelineMiddleware(BaseHTTPMiddleware): ...@@ -751,7 +751,6 @@ class PipelineMiddleware(BaseHTTPMiddleware):
user = get_current_user( user = get_current_user(
request, request,
get_http_authorization_cred(request.headers.get("Authorization")), get_http_authorization_cred(request.headers.get("Authorization")),
SessionLocal(),
) )
try: try:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment