From 49d02e03860e35b04c0209eecefe2083802f00e1 Mon Sep 17 00:00:00 2001 From: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Date: Thu, 3 Nov 2022 18:51:15 -0300 Subject: [PATCH] fix(db): remove a bucket overwrite EE-4424 (#7867) --- api/database/boltdb/db.go | 1 - api/database/boltdb/export.go | 1 - 2 files changed, 2 deletions(-) diff --git a/api/database/boltdb/db.go b/api/database/boltdb/db.go index 40411ce14..8fb371df2 100644 --- a/api/database/boltdb/db.go +++ b/api/database/boltdb/db.go @@ -421,7 +421,6 @@ func (connection *DbConnection) BackupMetadata() (map[string]interface{}, error) err := connection.View(func(tx *bolt.Tx) error { err := tx.ForEach(func(name []byte, bucket *bolt.Bucket) error { bucketName := string(name) - bucket = tx.Bucket([]byte(bucketName)) seqId := bucket.Sequence() buckets[bucketName] = int(seqId) return nil diff --git a/api/database/boltdb/export.go b/api/database/boltdb/export.go index fb582468c..00712c734 100644 --- a/api/database/boltdb/export.go +++ b/api/database/boltdb/export.go @@ -14,7 +14,6 @@ func backupMetadata(connection *bolt.DB) (map[string]interface{}, error) { err := connection.View(func(tx *bolt.Tx) error { err := tx.ForEach(func(name []byte, bucket *bolt.Bucket) error { bucketName := string(name) - bucket = tx.Bucket([]byte(bucketName)) seqId := bucket.Sequence() buckets[bucketName] = int(seqId) return nil