Skip to content

Commit bcb791e

Browse files
authored
allow updating of single brick values (#909)
1 parent 7106461 commit bcb791e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/DataIndex/Query/TreeQuery.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private function getQueryParameters(
8686
parentId: $parentId,
8787
pqlQuery: $widget->getPql(),
8888
path: $rootPath,
89-
pathIncludeParent: true,
89+
pathIncludeParent: $widget->isShowRoot(),
9090
pathIncludeDescendants: $includeAllChildren,
9191
classIds: json_encode($widget->getClasses(), JSON_THROW_ON_ERROR),
9292
);
@@ -103,6 +103,7 @@ classIds: json_encode($widget->getClasses(), JSON_THROW_ON_ERROR),
103103
parentId: $parentId,
104104
pqlQuery: $widget->getPql(),
105105
path: $rootPath,
106+
pathIncludeParent: $widget->isShowRoot(),
106107
pathIncludeDescendants: $includeAllChildren,
107108
);
108109
}

src/DataObject/Data/Adapter/ObjectBricksAdapter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,11 @@ private function getCollectionData(
272272
bool $isPatch
273273
): array {
274274
$collectionData = [];
275+
275276
foreach ($collectionDef->getFieldDefinitions() as $fd) {
276277
$adapter = $this->dataAdapterService->tryDataAdapter($fd->getFieldType());
277278
$fieldName = $fd->getName();
278-
if (!$adapter) {
279+
if (!$adapter || !isset($brickValue[$fieldName])) {
279280
continue;
280281
}
281282

0 commit comments

Comments
 (0)