diff --git a/app/controllers/spree/admin/products_controller.rb b/app/controllers/spree/admin/products_controller.rb index 13700e4c39..78f26faf6e 100644 --- a/app/controllers/spree/admin/products_controller.rb +++ b/app/controllers/spree/admin/products_controller.rb @@ -206,7 +206,7 @@ module Spree end def set_stock_levels(product, on_hand, on_demand) - variant = product_variant(product) + variant = product.variants.first begin variant.on_demand = on_demand if on_demand.present? @@ -226,12 +226,6 @@ module Spree end end - def product_variant(product) - return unless product.variants.any? - - product.variants.first - end - def set_product_master_variant_price_to_zero @product.price = 0 if @product.price.nil? end