Skip to content

Commit 4294865

Browse files
committed
Only save set model values.
1 parent 90ac3fe commit 4294865

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/MetaModels/MetaModel.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,11 @@ protected function saveAttribute($objAttribute, $arrIds, $varData, $strLangCode)
930930
protected function updateVariants($item, $activeLanguage, $allIds, $baseAttributes = false)
931931
{
932932
foreach ($this->getAttributes() as $strAttributeId => $objAttribute) {
933+
// Skip unset attributes.
934+
if (!$item->isAttributeSet($objAttribute->getColName())) {
935+
continue;
936+
}
937+
933938
if (!$baseAttributes && $item->isVariant() && !($objAttribute->get('isvariant'))) {
934939
// Skip base attribute.
935940
continue;

0 commit comments

Comments
 (0)