diff --git a/app/models/product_import/entry_validator.rb b/app/models/product_import/entry_validator.rb index f720af4aa5..bc1c4153ce 100644 --- a/app/models/product_import/entry_validator.rb +++ b/app/models/product_import/entry_validator.rb @@ -79,10 +79,9 @@ module ProductImport if entry.attributes['on_hand'].present? new_variant.on_hand = entry.attributes['on_hand'] end + check_on_hand_nil(entry, new_variant) end - check_on_hand_nil(entry, new_variant) - if new_variant.valid? entry.product_object = new_variant entry.validates_as = 'new_variant' unless entry.errors?