mirror of https://github.com/portainer/portainer
created bucket if not exists during restore sequence (#6614)
parent
a3b1466b96
commit
eb6cdf1229
|
@ -419,9 +419,9 @@ func (connection *DbConnection) RestoreMetadata(s map[string]interface{}) error
|
|||
}
|
||||
|
||||
err = connection.Batch(func(tx *bolt.Tx) error {
|
||||
bucket := tx.Bucket([]byte(bucketName))
|
||||
if bucket == nil {
|
||||
return nil
|
||||
bucket, err := tx.CreateBucketIfNotExists([]byte(bucketName))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return bucket.SetSequence(uint64(id))
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue