From 666e02f0c389c26bf85bab6a18a0aa78ae7b4257 Mon Sep 17 00:00:00 2001 From: hcrgm Date: Sat, 11 Mar 2023 20:45:35 +0800 Subject: [PATCH] fix(storage): explicitly set storages' status to disabled (#3810) --- internal/op/const.go | 1 + internal/op/storage.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/op/const.go b/internal/op/const.go index a465735f..0b4498c8 100644 --- a/internal/op/const.go +++ b/internal/op/const.go @@ -2,5 +2,6 @@ package op const ( WORK = "work" + DISABLED = "disabled" RootName = "root" ) diff --git a/internal/op/storage.go b/internal/op/storage.go index 75c755ee..353d2c93 100644 --- a/internal/op/storage.go +++ b/internal/op/storage.go @@ -142,6 +142,7 @@ func DisableStorage(ctx context.Context, id uint) error { } // delete the storage in the memory storage.Disabled = true + storage.SetStatus(DISABLED) err = db.UpdateStorage(storage) if err != nil { return errors.WithMessage(err, "failed update storage in db")