fix: default participant's nationality to German to avoid missing data
This commit is contained in:
@@ -186,7 +186,7 @@ class ParticipantDto
|
|||||||
$instance->lastName = $personalData->name;
|
$instance->lastName = $personalData->name;
|
||||||
$instance->title = $personalData->title;
|
$instance->title = $personalData->title;
|
||||||
$instance->gender = $personalData->gender;
|
$instance->gender = $personalData->gender;
|
||||||
$instance->nationality = $personalData->nationality;
|
$instance->nationality = $personalData->nationality ?: 'D';
|
||||||
$instance->email = $personalData->communication?->email;
|
$instance->email = $personalData->communication?->email;
|
||||||
$instance->mobile = $personalData->communication?->mobile;
|
$instance->mobile = $personalData->communication?->mobile;
|
||||||
$instance->dateOfBirth = $personalData->dateOfBirth;
|
$instance->dateOfBirth = $personalData->dateOfBirth;
|
||||||
|
|||||||
@@ -107,10 +107,10 @@ class ParticipantPrepopulationServiceTest extends TestCase
|
|||||||
$this->assertSame('Smith', $result->lastName);
|
$this->assertSame('Smith', $result->lastName);
|
||||||
$this->assertSame('[email protected]', $result->email);
|
$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->title);
|
||||||
$this->assertNull($result->gender);
|
$this->assertNull($result->gender);
|
||||||
$this->assertNull($result->nationality);
|
$this->assertSame('D', $result->nationality);
|
||||||
$this->assertNull($result->mobile);
|
$this->assertNull($result->mobile);
|
||||||
$this->assertNull($result->height);
|
$this->assertNull($result->height);
|
||||||
$this->assertNull($result->weight);
|
$this->assertNull($result->weight);
|
||||||
|
|||||||
Reference in New Issue
Block a user