mirror of https://github.com/portainer/portainer
DB upgrade failes if bucket does not exists (#6608)
parent
9f4549212d
commit
14ed6ed2a3
|
@ -407,6 +407,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 := tx.Bucket([]byte(bucketName))
|
||||||
|
if bucket == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return bucket.SetSequence(uint64(id))
|
return bucket.SetSequence(uint64(id))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue