route check added for product flat update
This commit is contained in:
parent
403a9dda4c
commit
14773bbfa8
|
|
@ -285,13 +285,15 @@ class ProductFlat
|
|||
$productFlat->save();
|
||||
}
|
||||
} else {
|
||||
$productFlat = $this->productFlatRepository->findOneWhere([
|
||||
'product_id' => $product->id,
|
||||
'channel' => $channel->code,
|
||||
]);
|
||||
if (request()->route()->getName() == 'admin.catalog.products.update') {
|
||||
$productFlat = $this->productFlatRepository->findOneWhere([
|
||||
'product_id' => $product->id,
|
||||
'channel' => $channel->code,
|
||||
]);
|
||||
|
||||
if ($productFlat) {
|
||||
$this->productFlatRepository->delete($productFlat->id);
|
||||
if ($productFlat) {
|
||||
$this->productFlatRepository->delete($productFlat->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue