From 9d8913241e987281ece4c48c638198f1e7cac963 Mon Sep 17 00:00:00 2001 From: Dave MacFarlane Date: Thu, 16 Oct 2025 11:01:54 -0400 Subject: [PATCH] [candidate_profile/imaging_browser] Fix Imaging QC Summary widget on canddiate_profile This fixes 2 problems which were preventing the Imaging QC summary widget on the candidate_profile page from loading correctly: 1. The type of the VisitMap prop was incorrectly set to "array". It is an object This was causing a javascript error. 2. iterator_to_array was called after it had already been iterated on in a foreach loop, resulting in the iterator_to_array returning an empty array. However, the result of the loop was not used anywhere, so it is simply removed. --- modules/imaging_browser/jsx/CandidateScanQCSummaryWidget.js | 2 +- modules/imaging_browser/php/module.class.inc | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/imaging_browser/jsx/CandidateScanQCSummaryWidget.js b/modules/imaging_browser/jsx/CandidateScanQCSummaryWidget.js index 252b962e565..0d3e39e8648 100644 --- a/modules/imaging_browser/jsx/CandidateScanQCSummaryWidget.js +++ b/modules/imaging_browser/jsx/CandidateScanQCSummaryWidget.js @@ -72,7 +72,7 @@ function CandidateScanQCSummaryWidget(props) { CandidateScanQCSummaryWidget.propTypes = { Files: PropTypes.array, BaseURL: PropTypes.string, - VisitMap: PropTypes.array, + VisitMap: PropTypes.object, }; /** diff --git a/modules/imaging_browser/php/module.class.inc b/modules/imaging_browser/php/module.class.inc index a998aee3845..b2f94b2d5d1 100644 --- a/modules/imaging_browser/php/module.class.inc +++ b/modules/imaging_browser/php/module.class.inc @@ -109,9 +109,6 @@ class Module extends \Module if (count($scansummary) === 0) { return []; } - foreach ($scansummary as $summary) { - $summary['nfiles'] = (int )$summary['nfiles']; - } return [ new CandidateWidget( "Imaging QC Summary",