diff --git a/app/Listeners/Finance/ApplyUserAutomatedTagsToTransaction.php b/app/Listeners/Finance/ApplyUserAutomatedTagsToTransaction.php index 76b1a7c..572e3b9 100644 --- a/app/Listeners/Finance/ApplyUserAutomatedTagsToTransaction.php +++ b/app/Listeners/Finance/ApplyUserAutomatedTagsToTransaction.php @@ -1,4 +1,5 @@ account; $user = $account->credential->user; + if (empty($user)) { + $this->logger->warning('No user found for account', [ + 'account' => $account->id, + 'transaction' => $transaction->id, + 'credential' => $account->credential?->id + ]); + return; + } $tags = $user->tags()->with('conditions')->where('type', 'automatic')->get();