Skip to content

Commit

Permalink
fix: delete account driver after get
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Jun 14, 2022
1 parent 7c4d28d commit 0d4542a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/operations/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ func UpdateAccount(ctx context.Context, account model.Account) error {
if err != nil {
return errors.WithMessage(err, "failed update account in database")
}
accountDriver, err := GetAccountByVirtualPath(oldAccount.VirtualPath)
if oldAccount.VirtualPath != account.VirtualPath {
// virtual path renamed, need to drop the account
accountsMap.Delete(oldAccount.VirtualPath)
}
accountDriver, err := GetAccountByVirtualPath(oldAccount.VirtualPath)
if err != nil {
return errors.WithMessage(err, "failed get account driver")
}
Expand Down

0 comments on commit 0d4542a

Please sign in to comment.