Skip to content

Commit

Permalink
Ensure callback application only on an already existing category.
Browse files Browse the repository at this point in the history
  • Loading branch information
romainruaud committed Jun 3, 2016
1 parent 961b839 commit f675b86
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function aroundSave(
\Closure $proceed,
\Magento\Framework\Model\AbstractModel $category
) {
if ($category->getSortedProducts()) {
if ($category->getId() && $category->getSortedProducts()) {
$this->unserializeProductPositions($category);

$categoryResource->addCommitCallback(
Expand Down

0 comments on commit f675b86

Please sign in to comment.