Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Vitanov committed Nov 28, 2023
1 parent dc2fe4d commit 50817ef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -1934,10 +1934,12 @@ func (a *Auth) deleteAccount(context storage.TransactionContext, account model.A

func (a *Auth) deleteAccountFromApps(context storage.TransactionContext, account model.Account, fromAppsIDs []string) error {
for _, idToDelete := range fromAppsIDs {
orgApps, _ := a.deleteApps(context, account.OrgAppsMemberships, idToDelete)
account.OrgAppsMemberships = orgApps
orgApps, err := a.deleteApps(context, account.OrgAppsMemberships, idToDelete)
if err != nil {
return errors.WrapErrorAction(logutils.ActionDelete, model.TypeAccount, nil, err)
}

err := a.storage.DeleteAccountOrgAppsMemberships(context, account.ID, orgApps)
err = a.storage.DeleteAccountOrgAppsMemberships(context, account.ID, orgApps)
if err != nil {
return errors.WrapErrorAction(logutils.ActionDelete, model.TypeAccount, nil, err)
}
Expand Down

0 comments on commit 50817ef

Please sign in to comment.