From ac53df37d931dce895af045a8dfc4425ec7b54ff Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Sat, 10 Apr 2021 13:01:10 +0100 Subject: [PATCH] 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. --- app/models/spree/line_item.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/spree/line_item.rb b/app/models/spree/line_item.rb index 97cd7dd888..6b17d87ca1 100644 --- a/app/models/spree/line_item.rb +++ b/app/models/spree/line_item.rb @@ -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!