Fix archiving namespaces
Signed-off-by: kolaente <k@knt.li>
This commit is contained in:
parent
c6d22bb1f8
commit
0a1887d6e7
1 changed files with 13 additions and 1 deletions
|
@ -453,7 +453,19 @@ func (n *Namespace) Update() (err error) {
|
|||
}
|
||||
}
|
||||
|
||||
// We need to specify the cols we want to update here to be able to un-archive lists
|
||||
colsToUpdate := []string{
|
||||
"name",
|
||||
"is_archived",
|
||||
}
|
||||
if n.Description != "" {
|
||||
colsToUpdate = append(colsToUpdate, "description")
|
||||
}
|
||||
|
||||
// Do the actual update
|
||||
_, err = x.ID(currentNamespace.ID).Update(n)
|
||||
_, err = x.
|
||||
ID(currentNamespace.ID).
|
||||
Cols(colsToUpdate...).
|
||||
Update(n)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue