Skip to content

Commit

Permalink
Adds a null coalescing operator to the license seat checkin notification
Browse files Browse the repository at this point in the history
  • Loading branch information
inietov committed Aug 30, 2023
1 parent c0cbdb1 commit 3cf9c1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Listeners/CheckoutableListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public function onCheckedIn($event)
/**
* 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){
Expand Down

0 comments on commit 3cf9c1f

Please sign in to comment.