change workspace from string to model

This commit is contained in:
Adrian Zürcher
2026-02-17 16:34:47 +01:00
parent e26c2af201
commit c4bd121388
2 changed files with 11 additions and 11 deletions

View File

@@ -154,8 +154,8 @@ func (aH *AccessHandler) DeleteWorkspace(c *gin.Context) {
return
}
for _, u := range users {
if u.Settings.Workspace == workspace.Name {
u.Settings.Workspace = ""
if u.Settings.Workspace.Name == workspace.Name {
u.Settings.Workspace = nil
}
u.Workspaces = slices.DeleteFunc(u.Workspaces, func(w *models.Workspace) bool {