mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
added conditional to listener
This commit is contained in:
parent
766b370264
commit
2412333152
|
@ -137,6 +137,10 @@ class CheckoutableListener
|
|||
*/
|
||||
private function getCheckoutAcceptance($event)
|
||||
{
|
||||
$checkedOutToType = get_class($event->checkedOutTo);
|
||||
if ($checkedOutToType != "App\Models\User") {
|
||||
return null;
|
||||
}
|
||||
if (!$event->checkoutable->requireAcceptance()) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue