From 86f1b53bd44f690e6d04ea7f0052e99a2e88dd4e Mon Sep 17 00:00:00 2001 From: Viktor Liu Date: Wed, 8 Apr 2026 07:54:14 +0200 Subject: [PATCH] Fix MySQL no-op update returning account not found in SaveAccountSettings --- management/server/store/sql_store.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/management/server/store/sql_store.go b/management/server/store/sql_store.go index 397b8673d..802cb7456 100644 --- a/management/server/store/sql_store.go +++ b/management/server/store/sql_store.go @@ -4077,9 +4077,10 @@ func (s *SqlStore) SaveAccountSettings(ctx context.Context, accountID string, se return status.Errorf(status.Internal, "failed to save account settings to store") } - if result.RowsAffected == 0 { - return status.NewAccountNotFoundError(accountID) - } + // MySQL reports RowsAffected=0 for no-op updates where values don't change, + // unlike SQLite/Postgres which report matched rows. Skip the check since the + // caller (UpdateAccountSettings) already verified the account exists via + // GetAccountSettings with LockingStrengthUpdate. return nil }