mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-15 04:14:24 +00:00
Changed name enable_reset to resettable in Variant Overrides table & updated views, specs accordingly
This commit is contained in:
committed by
Rob Harrington
parent
25454d3e97
commit
e423e890e0
@@ -56,7 +56,7 @@ class VariantOverride < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def reset_stock!
|
||||
if enable_reset
|
||||
if resettable
|
||||
if default_stock?
|
||||
self.attributes = { count_on_hand: default_stock }
|
||||
self.save
|
||||
|
||||
@@ -7,7 +7,7 @@ class VariantOverrideSet < ModelSet
|
||||
attrs['price'].blank? &&
|
||||
attrs['count_on_hand'].blank? &&
|
||||
attrs['default_stock'].blank? &&
|
||||
attrs['enable_reset'].blank? &&
|
||||
attrs['resettable'].blank? &&
|
||||
attrs['sku'].nil? &&
|
||||
attrs['on_demand'].nil?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user