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