Skip to content

Commit

Permalink
DataSet: widgets not showing 0 values due to empty check. (#2931)
Browse files Browse the repository at this point in the history
  • Loading branch information
dasgarner authored Mar 8, 2025
1 parent 8ae27c7 commit 07e00c9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/Listener/DataSetDataProviderListener.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2023 Xibo Signage Ltd
* Copyright (C) 2025 Xibo Signage Ltd
*
* Xibo - Digital Signage - https://xibosignage.com
*
Expand Down Expand Up @@ -236,10 +236,8 @@ private function getData(DataSet $dataSet, DataProviderInterface $dataProvider):
$item = [];
foreach ($mappings as $mapping) {
// This column is selected
$cellValue = $row[$mapping['heading']];
if (empty($cellValue)) {
$item[$mapping['heading']] = null;
} else if ($mapping['dataTypeId'] === 4) {
$cellValue = $row[$mapping['heading']] ?? null;
if ($mapping['dataTypeId'] === 4) {
// Grab the external image
$item[$mapping['heading']] = $dataProvider->addImage(
'dataset_' . md5($dataSet->dataSetId . $mapping['dataSetColumnId'] . $cellValue),
Expand Down

0 comments on commit 07e00c9

Please sign in to comment.