API: Fix order total after order change operation (#2700)

This commit is contained in:
Raphael Michel
2022-06-27 12:41:54 +02:00
committed by GitHub
parent c6c8e00f43
commit 5a6b7d783b
2 changed files with 7 additions and 0 deletions

View File

@@ -2304,6 +2304,11 @@ class OrderChangeManager:
# Do nothing
return
# Clear prefetched objects cache of order. We're going to modify the positions and fees and we have no guarantee
# that every operation tuple points to a position/fee instance that has been fetched from the same object cache,
# so it's dangerous to keep the cache around.
self.order._prefetched_objects_cache = {}
# finally, incorporate difference in payment fees
self._payment_fee_diff()