Fixed list update not working
This commit is contained in:
parent
aeff343a31
commit
5bb78a749e
1 changed files with 5 additions and 3 deletions
|
@ -9,10 +9,12 @@ func CreateOrUpdateList(list *List) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the namespace exists
|
// Check if the namespace exists
|
||||||
|
if list.NamespaceID != 0 {
|
||||||
_, err = GetNamespaceByID(list.NamespaceID)
|
_, err = GetNamespaceByID(list.NamespaceID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if list.ID == 0 {
|
if list.ID == 0 {
|
||||||
_, err = x.Insert(list)
|
_, err = x.Insert(list)
|
||||||
|
|
Loading…
Reference in a new issue