Skip to content

Commit

Permalink
fix hidden attendee ticket preventing checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
daveearley committed Jul 12, 2024
1 parent 256f945 commit c27ca25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/app/Validators/Rules/AttendeeQuestionRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace HiEvents\Validators\Rules;

use HiEvents\DomainObjects\QuestionDomainObject;
use Illuminate\Support\Collection;
use Illuminate\Validation\ValidationException;
use HiEvents\DomainObjects\QuestionDomainObject;

class AttendeeQuestionRule extends BaseQuestionRule
{
Expand All @@ -20,6 +20,7 @@ protected function validateRequiredQuestionArePresent(Collection $orderAttendees
$requiredQuestionIds = $this->questions
->filter(function (QuestionDomainObject $question) use ($ticketId) {
return $question->getRequired()
&& !$question->getIsHidden()
&& $question->getTickets()?->map(fn($ticket) => $ticket->getId())->contains($ticketId);
})
->map(fn(QuestionDomainObject $question) => $question->getId());
Expand Down

0 comments on commit c27ca25

Please sign in to comment.