mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Guard against attempting to send notification to model that isn't notifiable
This commit is contained in:
parent
f6a11ac0ed
commit
11208ee064
|
@ -142,9 +142,11 @@ class CheckoutableListener
|
|||
$notifiables = collect();
|
||||
|
||||
/**
|
||||
* Notify the user who checked out the item
|
||||
* Notify who checked out the item as long as the model can route notifications
|
||||
*/
|
||||
$notifiables->push($event->checkedOutTo);
|
||||
if (method_exists($event->checkedOutTo, 'routeNotificationFor')) {
|
||||
$notifiables->push($event->checkedOutTo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify Admin users if the settings is activated
|
||||
|
|
Loading…
Reference in a new issue