mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
Update app/models/spree/line_item.rb
Co-authored-by: Maikel <maikel@email.org.au>
This commit is contained in:
@@ -40,7 +40,7 @@ module Spree
|
||||
before_save :calculate_final_weight_volume, if: :quantity_changed?,
|
||||
unless: :final_weight_volume_changed?
|
||||
before_save :assign_units, if: ->(line_item) {
|
||||
line_item.new_record? || line_item.changed_attributes.keys.include?("final_weight_volume")
|
||||
line_item.new_record? || line_item.final_weight_volume_changed?
|
||||
}
|
||||
|
||||
before_destroy :update_inventory_before_destroy
|
||||
|
||||
Reference in New Issue
Block a user