diff --git a/app/models/variant_override.rb b/app/models/variant_override.rb index 6b43822e6c..355a46d1db 100644 --- a/app/models/variant_override.rb +++ b/app/models/variant_override.rb @@ -62,7 +62,7 @@ class VariantOverride < ActiveRecord::Base count_on_hand.present? end - def use_producer_settings? + def use_producer_stock_settings? on_demand.nil? end diff --git a/lib/open_food_network/scope_variant_to_hub.rb b/lib/open_food_network/scope_variant_to_hub.rb index d838e253cb..a721505f7f 100644 --- a/lib/open_food_network/scope_variant_to_hub.rb +++ b/lib/open_food_network/scope_variant_to_hub.rb @@ -37,7 +37,7 @@ module OpenFoodNetwork end def on_demand - if @variant_override.present? && !@variant_override.use_producer_settings? + if @variant_override.present? && !@variant_override.use_producer_stock_settings? @variant_override.on_demand else super