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 2026-10-20 14:18:03 -04:00 • committed by GitHub
parent c7e159bdd6
commit 97f5c4e973
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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: