diff --git a/app/models/concerns/variant_stock.rb b/app/models/concerns/variant_stock.rb index 1cc0ec4e04..5a6094adf4 100644 --- a/app/models/concerns/variant_stock.rb +++ b/app/models/concerns/variant_stock.rb @@ -40,9 +40,9 @@ module VariantStock # Checks whether this variant is produced on demand. def on_demand - # A variant that has not been saved yet, doesn't have a stock item + # A variant that has not been saved yet or has been soft-deleted doesn't have a stock item # This provides a default value for variant.on_demand using Spree::StockLocation.backorderable_default - return Spree::StockLocation.first.backorderable_default if stock_items.empty? + return Spree::StockLocation.first.backorderable_default if new_record? || deleted? stock_item.backorderable? end