fix: pq: update or delete on table account violates foreign key constraint privileges_account_id_fkey on table privileges
This commit is contained in:
parent
1383dbaa3a
commit
66af1731d3
@ -137,13 +137,13 @@ func (r *AccountRepository) DeleteAccount(ctx context.Context, accountID string)
|
||||
return err
|
||||
}
|
||||
|
||||
err = r.queries.DeleteAccountById(ctx, uuidAccount)
|
||||
err = r.queries.DeletePrivilegeByAccID(ctx, uuidAccount)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
return err
|
||||
}
|
||||
|
||||
err = r.queries.DeletePrivilegeByAccID(ctx, uuidAccount)
|
||||
err = r.queries.DeleteAccountById(ctx, uuidAccount)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user