Skip to content

Commit 3245504

Browse files
authored
Fix formatting issues
1 parent b4277c7 commit 3245504

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

backend/open_webui/retrieval/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,12 @@ def process_query(collection_name, query):
322322

323323
# Prepare tasks for all collections and queries
324324
# Avoid running any tasks for collections that failed to fetch data (have assigned None)
325-
tasks = [(cn, q) for cn in collection_names if collection_results[cn] is not None for q in queries]
325+
tasks = [
326+
(cn, q)
327+
for cn in collection_names
328+
if collection_results[cn] is not None
329+
for q in queries
330+
]
326331

327332
with ThreadPoolExecutor() as executor:
328333
future_results = [executor.submit(process_query, cn, q) for cn, q in tasks]

backend/open_webui/routers/auths.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ async def ldap_auth(request: Request, response: Response, form_data: LdapForm):
277277
raise
278278
except Exception as err:
279279
log.error(f"LDAP user creation error: {str(err)}")
280-
raise HTTPException(500, detail="Internal error occurred during LDAP user creation.")
280+
raise HTTPException(
281+
500, detail="Internal error occurred during LDAP user creation."
282+
)
281283

282284
user = Auths.authenticate_user_by_trusted_header(email)
283285

@@ -548,7 +550,10 @@ async def signout(request: Request, response: Response):
548550
)
549551
except Exception as e:
550552
log.error(f"OpenID signout error: {str(e)}")
551-
raise HTTPException(status_code=500, detail="Failed to sign out from the OpenID provider.")
553+
raise HTTPException(
554+
status_code=500,
555+
detail="Failed to sign out from the OpenID provider.",
556+
)
552557

553558
return {"status": True}
554559

@@ -593,7 +598,9 @@ async def add_user(form_data: AddUserForm, user=Depends(get_admin_user)):
593598
raise HTTPException(500, detail=ERROR_MESSAGES.CREATE_USER_ERROR)
594599
except Exception as err:
595600
log.error(f"Add user error: {str(err)}")
596-
raise HTTPException(500, detail="An internal error occurred while adding the user.")
601+
raise HTTPException(
602+
500, detail="An internal error occurred while adding the user."
603+
)
597604

598605

599606
############################

0 commit comments

Comments
 (0)