Skip to content

Commit

Permalink
Merge pull request #92 from MacBim/fix/select-attribut-translation
Browse files Browse the repository at this point in the history
fix(indexation): Default locale if attribute is not translatable
  • Loading branch information
maximehuran authored Jun 10, 2021
2 parents 211a83b + 6285ca6 commit dfd8f10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model/Documentable/DocumentableProductTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ protected function addAttributesInDocument(Result $document, string $locale): Re
} else {
$attributeValues[] = $attribute->getValue();
}
$document->addAttribute($attribute->getCode(), $attribute->getName(), $attributeValues, $attribute->getLocaleCode(), 1);
$document->addAttribute($attribute->getCode(), $attribute->getName(), $attributeValues, $attribute->getLocaleCode() ?? $locale, 1);
}

return $document;
Expand Down

0 comments on commit dfd8f10

Please sign in to comment.