Skip to content

Commit

Permalink
HPC-10037: Prevent warning in edge cases for attachments that are mis…
Browse files Browse the repository at this point in the history
…sing the caluclated fields even though it is part of the attachment prototype
  • Loading branch information
berliner committed Jan 27, 2025
1 parent 1357df1 commit 81ccfb1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ public function formatValue(array $conf) {

$data_point_index = $conf['data_points'][0]['index'];
$field = $this->getFieldByIndex($data_point_index);
if ($this->isCumulativeReachFieldType($field->type)) {
if ($field && $this->isCumulativeReachFieldType($field->type)) {
$period = $this->getLastNonEmptyReportingPeriod($data_point_index);
$build['#reporting_period'] = $period?->id ?? $build['#reporting_period'];
}
Expand Down

0 comments on commit 81ccfb1

Please sign in to comment.