Skip to content

Commit c7e850d

Browse files
authored
Merge pull request #6451 from SuperGoodSoft/more-optimization
Don't "persist_amounts" in order recalculation
2 parents 4e00cb1 + 6106722 commit c7e850d

2 files changed

Lines changed: 0 additions & 2 deletions

File tree

core/app/models/spree/in_memory_order_updater.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ def recalculate_line_item_prices
236236
end
237237

238238
def persist_totals
239-
shipments.each(&:persist_amounts)
240239
log_state_change("payment")
241240
log_state_change("shipment")
242241
order.save!

core/spec/models/spree/in_memory_order_updater_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,6 @@ module Spree
575575

576576
it "updates the shipment amount" do
577577
expect(shipment).to receive(:assign_amounts)
578-
expect(shipment).to receive(:persist_amounts)
579578
updater.recalculate
580579
end
581580
end

0 commit comments

Comments
 (0)