fix: Delete bank account with uncategorized transactions

This commit is contained in:
Ahmed Bouhuolia
2024-08-18 14:20:23 +02:00
parent 4ba1c0aa22
commit fb8118bea8
8 changed files with 131 additions and 13 deletions

View File

@@ -73,6 +73,7 @@ export class DeleteAccount {
.throwIfNotFound()
.queryAndThrowIfHasRelations({
type: ERRORS.ACCOUNT_HAS_ASSOCIATED_TRANSACTIONS,
excludeRelations: ['uncategorizedTransactions', 'plaidItem']
});
// Authorize before delete account.
await this.authorize(tenantId, accountId, oldAccount);