Skip to content

Commit

Permalink
HPC-10037: Prevent fatal error when trying to edit data points withou…
Browse files Browse the repository at this point in the history
…t configured attachment
  • Loading branch information
berliner committed Jan 27, 2025
1 parent df52c5e commit 1357df1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function getDefaultLabel() {
$attachment = $this->getAttachmentObject();
$data_point_conf = $this->get('data_point');
$data_point_index = $data_point_conf ? $data_point_conf['data_points'][0]['index'] : NULL;
if ($data_point_index === NULL) {
if (!$attachment || $data_point_index === NULL) {
return NULL;
}
return $attachment->getPrototype()->getDefaultFieldLabel($data_point_index, $attachment->getPlanLanguage());
Expand Down

0 comments on commit 1357df1

Please sign in to comment.