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,7 +137,11 @@ class CheckoutableListener
|
||||||
*/
|
*/
|
||||||
private function getCheckoutAcceptance($event)
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue