From 027ac1858bade9c2b3886a9f4f1fa67ace75cdb6 Mon Sep 17 00:00:00 2001 From: Limber Mamani <154026979+LimberHope@users.noreply.github.com> Date: Thu, 12 Dec 2024 09:31:40 -0400 Subject: [PATCH] [TM-1564] add validation to verify if exist project (#606) * [TM-1564] add validation to verify if exist project * lint fix --- app/Jobs/SendDailyDigestNotificationsJob.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Jobs/SendDailyDigestNotificationsJob.php b/app/Jobs/SendDailyDigestNotificationsJob.php index 123031ae..d663243e 100644 --- a/app/Jobs/SendDailyDigestNotificationsJob.php +++ b/app/Jobs/SendDailyDigestNotificationsJob.php @@ -37,6 +37,9 @@ public function __construct(Task $task) */ public function handle(): void { + if (! $this->task->project) { + return; + } $users = $this->task->project->users()->get(); $users = $this->skipRecipients($users); $usersGroupedByLocale = $users->groupBy('locale');