fix: default participant's nationality to German to avoid missing data
This commit is contained in:
1 parent
71a46c6b63
commit
7708ea6a0f
2 files changed
+3
-3
No files matched your search
@@ -186,7 +186,7 @@ class ParticipantDto
|
||||
$instance->lastName = $personalData->name;
|
||||
$instance->title = $personalData->title;
|
||||
$instance->gender = $personalData->gender;
|
||||
$instance->nationality = $personalData->nationality;
|
||||
$instance->nationality = $personalData->nationality ?: 'D';
|
||||
$instance->email = $personalData->communication?->email;
|
||||
$instance->mobile = $personalData->communication?->mobile;
|
||||
$instance->dateOfBirth = $personalData->dateOfBirth;
|
||||
|
||||
@@ -107,10 +107,10 @@ class ParticipantPrepopulationServiceTest extends TestCase
|
||||
$this->assertSame('Smith', $result->lastName);
|
||||
$this->assertSame('[email protected]', $result->email);
|
||||
|
||||
// Optional fields should be null
|
||||
// Optional fields should be null (except nationality which defaults to 'D')
|
||||
$this->assertNull($result->title);
|
||||
$this->assertNull($result->gender);
|
||||
$this->assertNull($result->nationality);
|
||||
$this->assertSame('D', $result->nationality);
|
||||
$this->assertNull($result->mobile);
|
||||
$this->assertNull($result->height);
|
||||
$this->assertNull($result->weight);
|
||||
|
||||
Reference in new issue
Block a user