|
7 | 7 | namespace Magento\Catalog\Model;
|
8 | 8 |
|
9 | 9 | use Magento\Catalog\Api\CategoryLinkManagementInterface;
|
| 10 | +use Magento\Catalog\Api\Data\ProductAttributeInterface; |
10 | 11 | use Magento\Catalog\Api\Data\ProductExtension;
|
11 | 12 | use Magento\Catalog\Api\Data\ProductInterface;
|
12 |
| -use Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\AttributeFilter; |
13 | 13 | use Magento\Catalog\Model\Attribute\ScopeOverriddenValue;
|
14 | 14 | use Magento\Catalog\Model\Product\Gallery\MimeTypeExtensionMap;
|
15 | 15 | use Magento\Catalog\Model\ProductRepository\MediaGalleryProcessor;
|
@@ -187,7 +187,6 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa
|
187 | 187 | */
|
188 | 188 | private $scopeOverriddenValue;
|
189 | 189 |
|
190 |
| - |
191 | 190 | /**
|
192 | 191 | * ProductRepository constructor.
|
193 | 192 | * @param ProductFactory $productFactory
|
@@ -261,8 +260,6 @@ public function __construct(
|
261 | 260 | $this->contentFactory = $contentFactory;
|
262 | 261 | $this->imageProcessor = $imageProcessor;
|
263 | 262 | $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor;
|
264 |
| - $this->attributeFilter = $attributeFilter ?: \Magento\Framework\App\ObjectManager::getInstance() |
265 |
| - ->get(AttributeFilter::class); |
266 | 263 | $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
|
267 | 264 | $this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()
|
268 | 265 | ->get(\Magento\Framework\Serialize\Serializer\Json::class);
|
@@ -597,7 +594,7 @@ public function save(ProductInterface $product, $saveOptions = false)
|
597 | 594 | $productAttributes = $product->getAttributes();
|
598 | 595 | if ($productAttributes !== null
|
599 | 596 | && $product->getStoreId() !== Store::DEFAULT_STORE_ID
|
600 |
| - && (count($stores) > 1 || count($websites) >= 1) |
| 597 | + && (count($stores) > 1 || count($websites) === 1) |
601 | 598 | ) {
|
602 | 599 | foreach ($productAttributes as $attribute) {
|
603 | 600 | $attributeCode = $attribute->getAttributeCode();
|
|
0 commit comments