mirror of
https://github.com/open-webui/open-webui
synced 2025-06-23 02:16:52 +00:00
Fix formatting issues
This commit is contained in:
parent
b4277c7d2e
commit
324550423c
@ -322,7 +322,12 @@ def query_collection_with_hybrid_search(
|
||||
|
||||
# Prepare tasks for all collections and queries
|
||||
# Avoid running any tasks for collections that failed to fetch data (have assigned None)
|
||||
tasks = [(cn, q) for cn in collection_names if collection_results[cn] is not None for q in queries]
|
||||
tasks = [
|
||||
(cn, q)
|
||||
for cn in collection_names
|
||||
if collection_results[cn] is not None
|
||||
for q in queries
|
||||
]
|
||||
|
||||
with ThreadPoolExecutor() as executor:
|
||||
future_results = [executor.submit(process_query, cn, q) for cn, q in tasks]
|
||||
|
@ -277,7 +277,9 @@ async def ldap_auth(request: Request, response: Response, form_data: LdapForm):
|
||||
raise
|
||||
except Exception as err:
|
||||
log.error(f"LDAP user creation error: {str(err)}")
|
||||
raise HTTPException(500, detail="Internal error occurred during LDAP user creation.")
|
||||
raise HTTPException(
|
||||
500, detail="Internal error occurred during LDAP user creation."
|
||||
)
|
||||
|
||||
user = Auths.authenticate_user_by_trusted_header(email)
|
||||
|
||||
@ -548,7 +550,10 @@ async def signout(request: Request, response: Response):
|
||||
)
|
||||
except Exception as e:
|
||||
log.error(f"OpenID signout error: {str(e)}")
|
||||
raise HTTPException(status_code=500, detail="Failed to sign out from the OpenID provider.")
|
||||
raise HTTPException(
|
||||
status_code=500,
|
||||
detail="Failed to sign out from the OpenID provider.",
|
||||
)
|
||||
|
||||
return {"status": True}
|
||||
|
||||
@ -593,7 +598,9 @@ async def add_user(form_data: AddUserForm, user=Depends(get_admin_user)):
|
||||
raise HTTPException(500, detail=ERROR_MESSAGES.CREATE_USER_ERROR)
|
||||
except Exception as err:
|
||||
log.error(f"Add user error: {str(err)}")
|
||||
raise HTTPException(500, detail="An internal error occurred while adding the user.")
|
||||
raise HTTPException(
|
||||
500, detail="An internal error occurred while adding the user."
|
||||
)
|
||||
|
||||
|
||||
############################
|
||||
|
Loading…
Reference in New Issue
Block a user