We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f976fa commit 7cd48fcCopy full SHA for 7cd48fc
app/code/Magento/Downloadable/Model/SampleRepository.php
@@ -308,8 +308,11 @@ protected function updateSample(
308
$existingSample->setTitle($sample->getTitle());
309
}
310
311
- if ($sample->getSampleType() === 'file' && $sample->getSampleFileContent() === null) {
312
- $sample->setSampleFile($existingSample->getSampleFile());
+ if ($sample->getSampleType() === 'file'
+ && $sample->getSampleFileContent() === null
313
+ && $sample->getSampleFile() !== null
314
+ ) {
315
+ $existingSample->setSampleFile($sample->getSampleFile());
316
317
$this->saveSample($product, $sample, $isGlobalScopeContent);
318
return $existingSample->getId();
0 commit comments