chore: format
This commit is contained in:
@@ -764,7 +764,8 @@ async def signin(
|
||||
user_id=trusted_header_user_id(email),
|
||||
)
|
||||
except IntegrityError:
|
||||
pass
|
||||
if not await Users.get_user_by_email(email.lower(), db=db):
|
||||
raise
|
||||
|
||||
user = await Auths.authenticate_user_by_email(email, db=db)
|
||||
if user:
|
||||
|
||||
@@ -990,7 +990,9 @@ async def model_response_handler(request, channel, message, user, db=None):
|
||||
response_parent_id = (
|
||||
message.parent_id
|
||||
if message.parent_id
|
||||
else (message.id if await Config.get('channels.model_response_mode', 'thread') == 'thread' else None)
|
||||
else (
|
||||
message.id if await Config.get('channels.model_response_mode', 'thread') == 'thread' else None
|
||||
)
|
||||
)
|
||||
|
||||
response_message, channel = await new_message_handler(
|
||||
|
||||
@@ -186,8 +186,10 @@ async def create_folder(
|
||||
detail=ERROR_MESSAGES.DEFAULT('Error creating folder'),
|
||||
)
|
||||
|
||||
if form_data.data and 'files' in form_data.data and not await can_read_all_folder_files(
|
||||
form_data.data['files'], user, db=db
|
||||
if (
|
||||
form_data.data
|
||||
and 'files' in form_data.data
|
||||
and not await can_read_all_folder_files(form_data.data['files'], user, db=db)
|
||||
):
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
|
||||
Reference in New Issue
Block a user