Merge pull request #15245 from spencerrlongg/bug/acceptance_issue

Fixed Issue with Acceptances Being Created
This commit is contained in:
snipe 2024-08-08 01:22:34 +01:00 committed by GitHub
commit 8094f3c0e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}