mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Prevent voucher adjustment from bein updated when update is called
This commit is contained in:
@@ -137,7 +137,10 @@ module OrderManagement
|
||||
end
|
||||
|
||||
def update_all_adjustments
|
||||
order.all_adjustments.reload.each(&:update_adjustment!)
|
||||
# Voucher are modelled as a Spree::Adjustment but they don't behave like all the other
|
||||
# adjustments, so we don't want voucher adjustment to be updated here.
|
||||
# Calculation are handled by VoucherAdjustmentsService.calculate
|
||||
order.all_adjustments.non_voucher.reload.each(&:update_adjustment!)
|
||||
end
|
||||
|
||||
def before_save_hook
|
||||
|
||||
Reference in New Issue
Block a user