Skip to content

Commit

Permalink
fix(storage): explicitly set storages' status to disabled (#3810)
Browse files Browse the repository at this point in the history
  • Loading branch information
hcrgm authored Mar 11, 2023
1 parent 6aaec19 commit 666e02f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/op/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ package op

const (
WORK = "work"
DISABLED = "disabled"
RootName = "root"
)
1 change: 1 addition & 0 deletions internal/op/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 666e02f

Please sign in to comment.