From f509fa6c869da407fa6be7150f84ad9b1ec8ab6d Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Fri, 23 Nov 2018 15:28:25 +0000 Subject: [PATCH] Make variantStock.on_demand= save the variant so that it doesn't impact on_hand that is already saving the variant with a lock --- app/models/concerns/variant_stock.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/concerns/variant_stock.rb b/app/models/concerns/variant_stock.rb index 75fc16151a..d54fbc4fcf 100644 --- a/app/models/concerns/variant_stock.rb +++ b/app/models/concerns/variant_stock.rb @@ -105,6 +105,7 @@ module VariantStock # unknown reasons, it does not pass the test. stock_items.each do |item| item.backorderable = new_value + item.save end end