1
0

fix: don't allow setting a list namespace to 0

See https://github.com/go-vikunja/app/issues/13
This commit is contained in:
kolaente
2022-10-01 15:02:13 +02:00
parent 374a0f9ce3
commit 96ed1e33e3
7 changed files with 59 additions and 22 deletions

View File

@ -640,6 +640,13 @@ func UpdateList(s *xorm.Session, list *List, auth web.Auth, updateListBackground
return
}
if list.NamespaceID == 0 {
return &ErrListMustBelongToANamespace{
ListID: list.ID,
NamespaceID: list.NamespaceID,
}
}
// We need to specify the cols we want to update here to be able to un-archive lists
colsToUpdate := []string{
"title",