From d69f42e940976b0ba3dfda7b7ca3db6c31dc4749 Mon Sep 17 00:00:00 2001 From: SarvarKhalimov Date: Tue, 15 Feb 2022 00:10:32 +0500 Subject: [PATCH] Update app/models/product_import/entry_validator.rb Co-authored-by: Maikel --- app/models/product_import/entry_validator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/product_import/entry_validator.rb b/app/models/product_import/entry_validator.rb index f3babe9c11..a759898e32 100644 --- a/app/models/product_import/entry_validator.rb +++ b/app/models/product_import/entry_validator.rb @@ -73,7 +73,7 @@ module ProductImport 'variant_unit_scale', 'primary_taxon_id') ) new_variant.save - if entry.attributes['unit_type'].present? || entry.attributes['variant_unit_name'].present? + if new_variant.persisted? if entry.attributes['on_demand'].present? new_variant.on_demand = entry.attributes['on_demand'] end