From d17e7c81607e33d1bc5c9d04dfd1d5031fdbccba Mon Sep 17 00:00:00 2001 From: Hui Date: Wed, 20 Oct 2021 16:00:40 +1300 Subject: [PATCH] fix(stack): auto update breaks after restarting Portainer EE-1915 --- api/bolt/stack/stack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/bolt/stack/stack.go b/api/bolt/stack/stack.go index b6839493f..a2af7e1f9 100644 --- a/api/bolt/stack/stack.go +++ b/api/bolt/stack/stack.go @@ -192,8 +192,8 @@ func (service *Service) RefreshableStacks() ([]portainer.Stack, error) { bucket := tx.Bucket([]byte(BucketName)) cursor := bucket.Cursor() - var stack portainer.Stack for k, v := cursor.First(); k != nil; k, v = cursor.Next() { + stack := portainer.Stack{} err := internal.UnmarshalObject(v, &stack) if err != nil { return err