mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 04:15:28 +02:00
created bucket if not exists during restore sequence (#6614)
This commit is contained in:
parent
a3b1466b96
commit
eb6cdf1229
1 changed files with 3 additions and 3 deletions
|
@ -419,9 +419,9 @@ func (connection *DbConnection) RestoreMetadata(s map[string]interface{}) error
|
||||||
}
|
}
|
||||||
|
|
||||||
err = connection.Batch(func(tx *bolt.Tx) error {
|
err = connection.Batch(func(tx *bolt.Tx) error {
|
||||||
bucket := tx.Bucket([]byte(bucketName))
|
bucket, err := tx.CreateBucketIfNotExists([]byte(bucketName))
|
||||||
if bucket == nil {
|
if err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
return bucket.SetSequence(uint64(id))
|
return bucket.SetSequence(uint64(id))
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue