From 1a29d4f60f774cd0a82a02e201ff7a152294d4e2 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 May 2018 15:41:19 -0700 Subject: [PATCH] Check for > 0 expected assets --- app/Console/Commands/SendExpectedCheckinAlerts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/SendExpectedCheckinAlerts.php b/app/Console/Commands/SendExpectedCheckinAlerts.php index 3c4b7ee523..1a2c6d09dd 100644 --- a/app/Console/Commands/SendExpectedCheckinAlerts.php +++ b/app/Console/Commands/SendExpectedCheckinAlerts.php @@ -61,7 +61,7 @@ class SendExpectedCheckinAlerts extends Command // Send a rollup to the admin, if settings dictate $recipient = new \App\Models\Recipients\AlertRecipient(); - if ($settings->alert_email!='') { + if (($assets) && ($assets->count() > 0) && ($settings->alert_email!='')) { $recipient->notify(new ExpectedCheckinAdminNotification($assets)); }