Skip to content

Commit

Permalink
[API] Using accessor to access instrument's commentid (#8801)
Browse files Browse the repository at this point in the history
Fix a bug where in json instrument, CommentID is not part of the instrumentData properties.
  • Loading branch information
xlecours committed Jun 20, 2023
1 parent f1c1327 commit 9a19807
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/api/php/views/visit/flags.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 9a19807

Please sign in to comment.