This commit is contained in:
Timothy Jaeryang Baek committed 2026-06-17 00:25:35 +02:00
1 parent 6b2d962cd6
commit 232421f40b
3 files changed
+36 -1

No files matched your search

+2 -1
View File
@@ -519,7 +519,8 @@ async def delete_folder_by_id(
folder_owner_id = folder.user_id
if await Chats.count_chats_by_folder_id_and_user_id(id, folder_owner_id, db=db):
folder_ids = await Folders.get_folder_ids_by_id_and_user_id_in_subtree(id, folder_owner_id, db=db)
if await Chats.count_chats_by_folder_ids_and_user_id(folder_ids, folder_owner_id, db=db):
chat_delete_permission = await has_permission(
user.id, 'chat.delete', request.app.state.config.USER_PERMISSIONS, db=db
)