From 3cf9c1fea536ea22289b275b28a1ccaf311b0028 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Wed, 30 Aug 2023 11:57:29 -0600 Subject: [PATCH] Adds a null coalescing operator to the license seat checkin notification --- app/Listeners/CheckoutableListener.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index 09cb3ae8f..fc86245d1 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -79,8 +79,8 @@ class CheckoutableListener /** * Send the appropriate notification */ - $acceptances = CheckoutAcceptance::where('checkoutable_id', $event->checkoutable->id) - ->where('assigned_to_id', $event->checkedOutTo->id) + $acceptances = CheckoutAcceptance::where('checkoutable_id', $event->checkoutable->id ?? null) + ->where('assigned_to_id', $event->checkedOutTo->id ?? null) ->get(); foreach($acceptances as $acceptance){