From 133181b08f27e11708c11878fba52642697481a7 Mon Sep 17 00:00:00 2001 From: Pontus Abrahamsson Date: Tue, 15 Oct 2024 11:20:00 +0200 Subject: [PATCH] Reset error details on bank account --- packages/jobs/src/transactions/manual-sync.ts | 1 + packages/jobs/src/transactions/sync.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/jobs/src/transactions/manual-sync.ts b/packages/jobs/src/transactions/manual-sync.ts index 32fc88f51..47f1ea414 100644 --- a/packages/jobs/src/transactions/manual-sync.ts +++ b/packages/jobs/src/transactions/manual-sync.ts @@ -108,6 +108,7 @@ client.defineJob({ .from("bank_accounts") .update({ balance: accountBalance.data.amount, + error_details: null, }) .eq("id", account.id); diff --git a/packages/jobs/src/transactions/sync.ts b/packages/jobs/src/transactions/sync.ts index 6d4f1829a..ba153a591 100644 --- a/packages/jobs/src/transactions/sync.ts +++ b/packages/jobs/src/transactions/sync.ts @@ -72,7 +72,10 @@ client.defineJob({ if (balance.data?.amount && balance.data.amount > 0) { await io.supabase.client .from("bank_accounts") - .update({ balance: balance.data.amount }) + .update({ + balance: balance.data.amount, + error_details: null, + }) .eq("id", account.id); await io.logger.info(`Updated balance for account ${account.id}`);