mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-06 02:51:34 +00:00
Fix private method called
```
Failure/Error: variant.stock_items.first.update_attribute(:count_on_hand, 10)
NoMethodError:
private method `count_on_hand=' called for #<Spree::StockItem:0x00005573998948a8>
Did you mean? count_on_hand
count_on_hand?
count_on_hand_was
# ./spec/models/spree/variant_spec.rb:249:in `block (5 levels) in <module:Spree>'
# -e:1:in `<main>'
```
This commit is contained in:
@@ -41,12 +41,12 @@ module Spree
|
||||
Spree::Variant.unscoped { super }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def count_on_hand=(value)
|
||||
self[:count_on_hand] = value
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def process_backorders
|
||||
backordered_inventory_units.each do |unit|
|
||||
break unless in_stock?
|
||||
|
||||
Reference in New Issue
Block a user