Skip to content

Commit

Permalink
Fixed inheritance of classificationstore values in data grid. (#716)
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo-ele authored and mcop1 committed Oct 18, 2024
1 parent db75bc2 commit 689b94d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Service/GridData/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public static function getData(AbstractObject $object, array $fields = null, str
}

// because the key for the classification store has not a direct getter, you have to check separately if the data is inheritable
if (str_starts_with($key, '~') && empty($data[$key])) {
if (str_starts_with($key, '~') && empty($data[$key]['value'])) {
$type = $keyParts[1];

if ($type === 'classificationstore') {
Expand Down Expand Up @@ -348,7 +348,8 @@ protected static function getInheritedData(Concrete $object, string $key, string
return [];
}

if ($inheritedValue = self::getStoreValueForObject($parent, $key, $requestedLanguage)) {
$inheritedValue = self::getStoreValueForObject($parent, $key, $requestedLanguage);
if (!empty($inheritedValue['value'])) {
return [
'parent' => $parent,
'value' => $inheritedValue,
Expand Down

0 comments on commit 689b94d

Please sign in to comment.