fix: ensure valid applicant data
This commit is contained in:
@@ -105,6 +105,11 @@ class BookingDataProcessor
|
||||
|
||||
// Update applicant's data with personal data of first participant
|
||||
if (false !== $firstParticipant = reset($bookingData->participants)) {
|
||||
// Ensure valid nationality
|
||||
if (true === empty($bookingData->applicant->nationality)) {
|
||||
$bookingData->applicant->nationality = $firstParticipant->nationality;
|
||||
}
|
||||
|
||||
$bookingData->applicant->height = $firstParticipant->height;
|
||||
$bookingData->applicant->weight = $firstParticipant->weight;
|
||||
$bookingData->applicant->shoeSize = $firstParticipant->shoeSize;
|
||||
|
||||
Reference in New Issue
Block a user