change user db structure for workspaces

This commit is contained in:
Adrian Zürcher
2026-02-20 18:31:26 +01:00
parent 5b1488e347
commit f4b00ba297
4 changed files with 22 additions and 20 deletions

View File

@@ -156,10 +156,10 @@ func (aH *AccessHandler) DeleteWorkspace(c *gin.Context) {
}
for _, u := range users {
if u.Settings.Workspace == nil {
if u.WorkspaceID == nil {
continue
} else if u.Settings.Workspace.Uuid.String() == workspace.Uuid.String() {
u.Settings.Workspace = nil
} else if *u.WorkspaceID == workspace.Id {
u.WorkspaceID = nil
}
u.Workspaces = slices.DeleteFunc(u.Workspaces, func(w *models.Workspace) bool {