mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-26 05:55:15 +00:00
Remove in_stock dead scope
This makes the upgrade to Spree 2.0 a bit easier. `spree_variants.count_on_hand` is removed in that version and this column was used in the `in_stock` scope that we no longer use.
This commit is contained in:
@@ -34,7 +34,6 @@ Spree::Variant.class_eval do
|
||||
scope :with_order_cycles_inner, joins(exchanges: :order_cycle)
|
||||
|
||||
scope :not_deleted, where(deleted_at: nil)
|
||||
scope :in_stock, where('spree_variants.count_on_hand > 0 OR spree_variants.on_demand=?', true)
|
||||
scope :in_order_cycle, lambda { |order_cycle|
|
||||
with_order_cycles_inner.
|
||||
merge(Exchange.outgoing).
|
||||
|
||||
Reference in New Issue
Block a user