|
|
@@ -303,7 +303,7 @@ class FlexibleVariantController extends Controller
|
|
|
$option['id'] = $optionModel->id;
|
|
|
|
|
|
foreach ($option['option_values'] as $optionValueIndex => $value) {
|
|
|
- $optionValueModel = ProductOptionValue::find($value['id'] ?: ($mapOptionValues[$value['code']] ?? null))
|
|
|
+ $optionValueModel = ProductOptionValue::find(($value['id'] ?? null) ?: ($mapOptionValues[$value['code']] ?? null))
|
|
|
?? new ProductOptionValue(['product_option_id' => $option['id']]);
|
|
|
|
|
|
$optionValueModel->label = $value['label'];
|