mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-01 21:47:16 +00:00
Update guard clause in line item callbacks (take two)
The `changed?` method is more accurately replaced by `saved_changes.present?` In some cases here (where the object had just been saved for the first time) the guard clause was still stopping execution unexpectedly.
This commit is contained in:
@@ -226,7 +226,7 @@ module Spree
|
||||
end
|
||||
|
||||
def update_order
|
||||
return unless saved_change_to_quantity? || destroyed?
|
||||
return unless saved_changes.present? || destroyed?
|
||||
|
||||
# update the order totals, etc.
|
||||
order.create_tax_charge!
|
||||
|
||||
Reference in New Issue
Block a user