From b5132727733639721bbef6b8dc01cbd1a40f46ac Mon Sep 17 00:00:00 2001 From: Dominik Meyer Date: Wed, 4 Nov 2020 08:42:41 +0100 Subject: [PATCH] FIX shopbuilder faker data --- .../ItemSearch/Factories/Faker/Traits/HandleNestedArray.php | 2 +- src/Services/ItemSearch/Factories/Faker/VariationFaker.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Services/ItemSearch/Factories/Faker/Traits/HandleNestedArray.php b/src/Services/ItemSearch/Factories/Faker/Traits/HandleNestedArray.php index 70ed2dbe1..f266a3926 100644 --- a/src/Services/ItemSearch/Factories/Faker/Traits/HandleNestedArray.php +++ b/src/Services/ItemSearch/Factories/Faker/Traits/HandleNestedArray.php @@ -20,7 +20,7 @@ protected function merge(&$object, $defaults) { $this->merge($object[$key], (array)$defaultValue); } - else if (is_null($object[$key])) + else if (is_null($object[$key]) || $object[$key] === 0) { $object[$key] = $defaultValue; } diff --git a/src/Services/ItemSearch/Factories/Faker/VariationFaker.php b/src/Services/ItemSearch/Factories/Faker/VariationFaker.php index 29c8b5d86..c9e17d1d7 100644 --- a/src/Services/ItemSearch/Factories/Faker/VariationFaker.php +++ b/src/Services/ItemSearch/Factories/Faker/VariationFaker.php @@ -66,7 +66,8 @@ public function fill($data) "automaticClientVisibility" => $this->number(0, 3), "automaticListVisibility" => $this->number(0, 3), "isHiddenInCategoryList" => $this->boolean(), - "availability" => $this->makeAvailability() + "availability" => $this->makeAvailability(), + "customsTariffNumber" => $this->serial() ]; $this->merge($data, $default);