diff --git a/src/Repository.php b/src/Repository.php index db43e82..14d3f61 100644 --- a/src/Repository.php +++ b/src/Repository.php @@ -11,6 +11,8 @@ use Makaira\OxidConnectEssential\Type\Product\Product; use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use function array_unique; +use function array_values; use function get_object_vars; /** @@ -211,6 +213,11 @@ public function getChangesFromList(array $result, int $since, int $limit = 50): (array) $this->parentAttributes[$parentId]['attributeFloat'], $change->data->attributeFloat ); + + $change->data->attributeStr = array_values(array_unique($change->data->attributeStr)); + $change->data->attributeInt = array_values(array_unique($change->data->attributeInt)); + $change->data->attributeFloat = array_values(array_unique($change->data->attributeFloat)); + unset( $change->data->tmpAttributeStr, $change->data->tmpAttributeInt,