Skip to content

Commit f3dcf3a

Browse files
author
Eric Bohanon
committed
MAGETWO-83872: Write metadata service
1 parent 9bb26f4 commit f3dcf3a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

dev/tests/api-functional/testsuite/Magento/Downloadable/Api/ProductRepositoryTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,15 @@ protected function deleteProductBySku($productSku)
605605
*/
606606
protected function saveProduct($product)
607607
{
608+
if (isset($product['custom_attributes'])) {
609+
for ($i=0; $i<sizeof($product['custom_attributes']); $i++) {
610+
if ($product['custom_attributes'][$i]['attribute_code'] == 'category_ids'
611+
&& !is_array($product['custom_attributes'][$i]['value'])
612+
) {
613+
$product['custom_attributes'][$i]['value'] = [""];
614+
}
615+
}
616+
}
608617
$resourcePath = self::RESOURCE_PATH . '/' . $product['sku'];
609618
$serviceInfo = [
610619
'rest' => [

0 commit comments

Comments
 (0)