diff --git a/management/server/group.go b/management/server/group.go index d7711c126..37a6fc305 100644 --- a/management/server/group.go +++ b/management/server/group.go @@ -163,7 +163,7 @@ func (am *DefaultAccountManager) SaveGroups(ctx context.Context, accountID, user } account.Network.IncSerial() - if err = am.Store.SaveGroups(account.Id, account.Groups); err != nil { + if err = am.Store.SaveAccount(ctx, account); err != nil { return err } diff --git a/management/server/user.go b/management/server/user.go index 2cb6b45aa..b8afcda3a 100644 --- a/management/server/user.go +++ b/management/server/user.go @@ -859,7 +859,7 @@ func (am *DefaultAccountManager) SaveOrAddUsers(ctx context.Context, accountID, } account.Network.IncSerial() - if err = am.Store.SaveUsers(account.Id, account.Users); err != nil { + if err = am.Store.SaveAccount(ctx, account); err != nil { return nil, err }