mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-10 03:30:22 +00:00
Fix intermittent 500 error when updating the cart
This commit is contained in:
@@ -2,6 +2,7 @@ Spree::TaxRate.class_eval do
|
||||
def adjust_with_included_tax(order)
|
||||
adjust_without_included_tax(order)
|
||||
|
||||
order.reload
|
||||
(order.adjustments.tax + order.price_adjustments).each do |a|
|
||||
a.set_absolute_included_tax! a.amount
|
||||
end
|
||||
|
||||
@@ -23,6 +23,11 @@ module Spree
|
||||
adjustment.amount.should be > 0
|
||||
adjustment.included_tax.should == adjustment.amount
|
||||
end
|
||||
|
||||
it "does not crash when order data has been updated previously" do
|
||||
order.price_adjustments.first.destroy
|
||||
tax_rate.adjust(order)
|
||||
end
|
||||
end
|
||||
|
||||
describe "Shipment adjustments" do
|
||||
|
||||
Reference in New Issue
Block a user