diff --git a/app/src/Controller/MatchgridsController.php b/app/src/Controller/MatchgridsController.php index be9faadab..5577c4582 100644 --- a/app/src/Controller/MatchgridsController.php +++ b/app/src/Controller/MatchgridsController.php @@ -243,14 +243,14 @@ public function reconcile(string $id) { $results = $MatchService->searchReferenceId($sor, $sorid, $AttributeManager); + // Insert the original request as "new" + $candidates[] = $origReq[$rowId]; + // Count could be 0 if we failed to match any rules at all (canonical or potential) if($results->count() > 0) { - $candidates = $results->getRawResults(); + $candidates = array_merge($candidates,$results->getRawResults()); } - // Insert the original request as "new" - $candidates[] = $origReq[$rowId]; - $this->set('vv_candidates', $candidates); // Also set the original request separately to make it easier for the view $this->set('vv_request', $origReq[$rowId]);