diff --git a/spec/services/variants_stock_levels_spec.rb b/spec/services/variants_stock_levels_spec.rb index 630fc2c2de..13b2056d96 100644 --- a/spec/services/variants_stock_levels_spec.rb +++ b/spec/services/variants_stock_levels_spec.rb @@ -53,7 +53,7 @@ RSpec.describe VariantsStockLevels do describe "when the variant has an override" do let!(:distributor) { create(:distributor_enterprise) } - let(:supplier) { variant_in_the_order.product.supplier } + let(:supplier) { variant_in_the_order.supplier } let!(:order_cycle) { create(:simple_order_cycle, suppliers: [supplier], distributors: [distributor], variants: [variant_in_the_order, variant_not_in_the_order])