fix: deleting an account leaves its saved folder layouts behind (#35558)

When an admin deleted an account, the tab and pane layouts that person had saved in folders stayed stored, while their chat layouts were removed. Deleting an account now also removes its folder layouts. Other people's layouts are not touched.

Fixes #35555
This commit is contained in:
Classic298 authored and GitHub committed 2026-12-03 03:20:35 +04:00
1 parent ae1a952ee4
commit 0d3f6b6ced
1 file changed
+3
+3
View File
@@ -890,6 +890,9 @@ class UsersTable:
from open_webui.models.chat_views import ChatViewState
await session.execute(delete(ChatViewState).where(ChatViewState.user_id == id))
from open_webui.models.folder_views import FolderViewState
await session.execute(delete(FolderViewState).where(FolderViewState.user_id == id))
from open_webui.models.access_grants import AccessGrant
await session.execute(delete(AccessGrant).filter_by(principal_type='user', principal_id=id))