Skip to content

Commit

Permalink
Fix passing parameters for method isValidateAdminValuesWithStoreOptio…
Browse files Browse the repository at this point in the history
…nValues
  • Loading branch information
kenza-ya committed Sep 6, 2023
1 parent ca38d42 commit 947ab3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Version 22.0.6
# Version 22.0.7

## Bugfixes

* Fix exception if no attribute values are defined on admin row
* Fix passing parameters for method `isValidateAdminValuesWithStoreOptionValues`

# Version 22.0.5

Expand Down
6 changes: 5 additions & 1 deletion src/Observers/AttributeOptionValueExportObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,17 @@ protected function process()
});

// validate the admin values with the option values
if (count($attributeOptionValues) === 0 || !$this->isValidateAdminValuesWithStoreOptionValues($adminValueArtefacts, $attributeOptionValues)) {
if (count($attributeOptionValues) === 0) {
// Skip the export if the store values are not valid
return;
}

$adminValueArtefacts = $this->getArtefactsByTypeAndEntityId(AttributeOptionExportObserver::ARTEFACT_TYPE, $this->getLastEntityId());

if (!$this->isValidateAdminValuesWithStoreOptionValues($adminValueArtefacts, $attributeOptionValues)){
return;
}

// iterate over the attribute option values and export them
foreach ($attributeOptionValues as $key => $attributeOptionValue) {

Expand Down

0 comments on commit 947ab3f

Please sign in to comment.