diff --git a/app/src/Model/Table/JobsTable.php b/app/src/Model/Table/JobsTable.php index 3d016635..9696b618 100644 --- a/app/src/Model/Table/JobsTable.php +++ b/app/src/Model/Table/JobsTable.php @@ -382,7 +382,7 @@ public function isCanceled(int $id): bool { // Make sure to skip any cached records, since a Job InProgress needs up to // date status to determine if it should stop. - $job = $this->get($id, ['cache' => false]); + $job = $this->get($id, cache: false); return $job->status == JobStatusEnum::Canceled; } diff --git a/app/src/Model/Table/PipelinesTable.php b/app/src/Model/Table/PipelinesTable.php index 184374fc..69a4f680 100644 --- a/app/src/Model/Table/PipelinesTable.php +++ b/app/src/Model/Table/PipelinesTable.php @@ -1449,17 +1449,18 @@ protected function searchByApi( 'Identifiers.person_id IS NOT NULL', 'People.co_id' => $eis->co_id ]) - ->contain(['People' => 'PrimaryName']) // XXX do we need PrimaryName? + ->contain(['People' => 'PrimaryName']) ->all(); // We find all(), but really we should get back 0 or 1 records. if($matches->count() == 1) { - $person = $matches->first(); + // We have an Identifier, but want to return the Person + $identifier = $matches->first(); - $this->llog('trace', "Mapped Reference ID $referenceId to Person " . $person->id); + $this->llog('trace', "Mapped Reference ID $referenceId to Person " . $identifier->person->id); - return $person; + return $identifier->person; } elseif($matches->count() == 0) { $this->llog('trace', "No existing Person record found for Reference ID $referenceId"); // No match