Don't fail when removing the last bucket in migration from other services
This commit is contained in:
parent
f1df45b632
commit
d7932d2648
1 changed files with 1 additions and 1 deletions
|
@ -227,7 +227,7 @@ func InsertFromStructure(str []*models.NamespaceWithLists, user *user.User) (err
|
||||||
}
|
}
|
||||||
buckets := bucketsIn.([]*models.Bucket)
|
buckets := bucketsIn.([]*models.Bucket)
|
||||||
err = buckets[0].Delete(s, user)
|
err = buckets[0].Delete(s, user)
|
||||||
if err != nil {
|
if err != nil && !models.IsErrCannotRemoveLastBucket(err) {
|
||||||
_ = s.Rollback()
|
_ = s.Rollback()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue