fix: Archive All Chats takes chats out of their folders, so deleting a folder no longer deletes them (#32647)

This commit is contained in:
G30 authored and GitHub committed 2026-10-21 03:18:03 +09:00
1 parent c7e159bdd6
commit 97f5c4e973
1 file changed
+1 -1
+1 -1
View File
@@ -1565,7 +1565,7 @@ class ChatTable:
async def archive_all_chats_by_user_id(self, user_id: str, db: AsyncSession | None = None) -> bool:
try:
async with get_async_db_context(db) as session:
await session.execute(update(Chat).filter_by(user_id=user_id).values(archived=True))
await session.execute(update(Chat).filter_by(user_id=user_id).values(archived=True, folder_id=None))
await session.commit()
return True
except Exception: