aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/mobius/account_manager.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/mobius/account_manager.go b/internal/mobius/account_manager.go
index 6bbc951..72984b7 100644
--- a/internal/mobius/account_manager.go
+++ b/internal/mobius/account_manager.go
@@ -114,10 +114,9 @@ func (am *YAMLAccountManager) Update(account hotline.Account, newLogin string) e
return fmt.Errorf("error renaming account file: %w", err)
}
+ delete(am.accounts, account.Login)
account.Login = newLogin
am.accounts[newLogin] = account
-
- delete(am.accounts, account.Login)
}
out, err := yaml.Marshal(&account)