Remove superfluous method from products controller

This commit is contained in:
Matt-Yorkley
2023-06-07 13:33:50 +01:00
parent b59bdc75e9
commit ced60d4382

View File

@@ -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