Skip to content

Commit

Permalink
Partial rollback of PipelinesTable changes introduced in 54033ad for …
Browse files Browse the repository at this point in the history
…CFM-121
  • Loading branch information
Benn Oshrin committed May 25, 2025
1 parent 29da570 commit a6c77a2
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions app/src/Model/Table/PipelinesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,7 @@ public function execute(
$pipeline,
$eis,
$eisBackendRecord['source_key'],
$eisBackendRecord['source_record'],
$personId
$eisBackendRecord['source_record']
);

if(!$force && $eisRecord['status'] == 'unchanged') {
Expand Down Expand Up @@ -762,8 +761,7 @@ protected function manageEISRecord(
Pipeline $pipeline,
ExternalIdentitySource $eis,
string $sourceKey,
?string $sourceRecord=null,
?int $personId=null,
?string $sourceRecord=null
): array {
$status = 'unknown';

Expand Down Expand Up @@ -798,12 +796,6 @@ protected function manageEISRecord(
throw new \InvalidArgumentException(__d('error', 'Pipelines.eis.record.adopted', [$sourceKey, $eisRecord->adopted_person_id]));
}

// The Person that initiated the Link does not match the one of the eisRecord found
if($eisRecord->external_identity?->person_id !== $personId) {
$this->llog('rule', "AR-ExternalIdentity-2 Rejecting request to update duplicate/used record for EIS" . $eis->description . " (" . $eis->id . ") source key $sourceKey");
throw new \InvalidArgumentException(__d('error', 'Pipelines.eis.record.used', [$sourceKey, $eisRecord->external_identity->person_id]));
}

// Update the record as needed, but only if the source record changed.
// We consider any aspect of the source record changing to mark the
// EIS record as changed, even if it's not material to the attributes
Expand Down

0 comments on commit a6c77a2

Please sign in to comment.