Skip to content

Commit

Permalink
Bug fixes (NOJIRA)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Dec 8, 2025
1 parent 9aa2383 commit 84b9797
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/src/Model/Table/JobsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
9 changes: 5 additions & 4 deletions app/src/Model/Table/PipelinesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 84b9797

Please sign in to comment.