fix(storage): explicitly set storages' status to disabled (#3810)
This commit is contained in:
parent
6aaec19c1c
commit
666e02f0c3
@ -2,5 +2,6 @@ package op
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
WORK = "work"
|
WORK = "work"
|
||||||
|
DISABLED = "disabled"
|
||||||
RootName = "root"
|
RootName = "root"
|
||||||
)
|
)
|
||||||
|
@ -142,6 +142,7 @@ func DisableStorage(ctx context.Context, id uint) error {
|
|||||||
}
|
}
|
||||||
// delete the storage in the memory
|
// delete the storage in the memory
|
||||||
storage.Disabled = true
|
storage.Disabled = true
|
||||||
|
storage.SetStatus(DISABLED)
|
||||||
err = db.UpdateStorage(storage)
|
err = db.UpdateStorage(storage)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.WithMessage(err, "failed update storage in db")
|
return errors.WithMessage(err, "failed update storage in db")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user