Skip to content

Commit

Permalink
Merge pull request #1153 from UN-OCHA/release-versions/v1.11.1
Browse files Browse the repository at this point in the history
HPC-9848: Fix error when creating a baseline for a sparkline chart item if there is no value for any reporting period
  • Loading branch information
berliner authored Oct 31, 2024
2 parents d101c73 + 99da798 commit 9e57cfc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public function getRenderArray() {

// Add a baseline if needed.
if ($show_baseline) {
$baseline_value = $attachment->getMeasurementMetricValue($baseline, $last_reporting_period->id());
$baseline_value = $attachment->getMeasurementMetricValue($baseline, $last_reporting_period?->id() ?? 'latest');
}

// Render the chart.
Expand Down

0 comments on commit 9e57cfc

Please sign in to comment.