added conditional to listener
This commit is contained in:
parent
766b370264
commit
2412333152
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue