From 60d9a33f0d5001f3cb2ecf6fcbbc99975ac94237 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 15 Jan 2023 15:22:29 +1100 Subject: [PATCH] Minor fixes for ninjamailer --- app/Jobs/Mail/NinjaMailerJob.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 6c3c941b5f67..f331e3597da2 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -90,7 +90,7 @@ class NinjaMailerJob implements ShouldQueue $this->company = Company::where('company_key', $this->nmo->company->company_key)->first(); /* If any pre conditions fail, we return early here */ - if($this->preFlightChecksFail()) + if(!$this->company || $this->preFlightChecksFail()) return; /* Set the email driver */