Fix callback in LineItem

#changed? here was not working as before, and the code was never getting past this guard in various places where previously it did. This meant the callback was effectively disabled, and order.update! was not being called when it should be.
This commit is contained in:
Matt-Yorkley
2021-04-10 13:01:10 +01:00
parent 279c15c306
commit ac53df37d9

View File

@@ -226,7 +226,7 @@ module Spree
end
def update_order
return unless changed? || destroyed?
return unless saved_change_to_quantity? || destroyed?
# update the order totals, etc.
order.create_tax_charge!