test
This commit is contained in:
parent
94ad0c0772
commit
5ddca35389
|
|
@ -3120,8 +3120,8 @@ private function upsertAddress(int $personId, array $addrData, $mappings): array
|
|||
}
|
||||
// If identical address already exists anywhere, skip to avoid constraint violation
|
||||
$existingAny = PersonAddress::where('address', $addressLine)->first();
|
||||
if ($existingAny && $existingAny->person_id !== $personId) {
|
||||
return ['action' => 'skipped', 'message' => 'Address already exists for another person'];
|
||||
if ($existingAny) {
|
||||
return ['action' => 'skipped', 'message' => 'Address already exists in database'];
|
||||
}
|
||||
// Default country SLO if not provided
|
||||
if (! isset($addrData['country']) || $addrData['country'] === null || $addrData['country'] === '') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user