mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove superfluous method from products controller
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user