Fixed creation of new namespaces

This commit is contained in:
konrad 2018-07-12 23:22:02 +02:00 committed by kolaente
parent e5493965ff
commit b24b245f4d
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -6,6 +6,7 @@ func (n *Namespace) Create(doer *User, _ int64) (err error) {
if n.Name == "" {
return ErrNamespaceNameCannotBeEmpty{NamespaceID: 0, UserID: doer.ID}
}
n.ID = 0 // This would otherwise prevent the creation of new lists after one was created
// Check if the User exists
n.Owner, _, err = GetUserByID(doer.ID)