[management] Move increment network serial as last step of each transaction (#4397)

This commit is contained in:
Pascal Fischer
2025-08-25 17:27:07 +02:00
committed by GitHub
parent 5e273c121a
commit 3488a516c9
9 changed files with 61 additions and 56 deletions

View File

@@ -113,11 +113,11 @@ func (am *DefaultAccountManager) SaveDNSSettings(ctx context.Context, accountID
events := am.prepareDNSSettingsEvents(ctx, transaction, accountID, userID, addedGroups, removedGroups)
eventsToStore = append(eventsToStore, events...)
if err = transaction.IncrementNetworkSerial(ctx, accountID); err != nil {
if err = transaction.SaveDNSSettings(ctx, accountID, dnsSettingsToSave); err != nil {
return err
}
return transaction.SaveDNSSettings(ctx, accountID, dnsSettingsToSave)
return transaction.IncrementNetworkSerial(ctx, accountID)
})
if err != nil {
return err