From 9a19807f8cf2c2bc655b5df91ab87a3d86a8ad4b Mon Sep 17 00:00:00 2001 From: Xavier Lecours Date: Tue, 20 Jun 2023 11:33:54 -0400 Subject: [PATCH] [API] Using accessor to access instrument's commentid (#8801) Fix a bug where in json instrument, CommentID is not part of the instrumentData properties. --- modules/api/php/views/visit/flags.class.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/api/php/views/visit/flags.class.inc b/modules/api/php/views/visit/flags.class.inc index e1d88c84c2d..fa92f8d6e12 100644 --- a/modules/api/php/views/visit/flags.class.inc +++ b/modules/api/php/views/visit/flags.class.inc @@ -50,9 +50,9 @@ class Flags public function toArray(): array { $instrumentname = $this->_instrument->testName; - $instrumentdata = $this->_instrument->getInstanceData(); + $commentid = $this->_instrument->getCommentID() ?? ''; - $isDDE = strpos($instrumentdata['CommentID'], 'DDE_') === 0; + $isDDE = strpos($commentid, 'DDE_') === 0; $meta = [ 'Candidate' => $this->_timepoint->getCandID(),