-
Add data migration for fixing invalid undiscounted total on order lines (#10012) (7a524a7)
Previously,
OrderLine
undiscounted total was calculated fromunit_price
instead ofundiscounted_unict_price
.Example invalid order line data from before the migration:
unit_price: 5 USD
undiscounted_unit_price: 10 USD
quantity: 2
total_price: 10 USD
undiscoutend_total_price: 10 USDCorrect data after the migration:
unit_price: 5 USD
undiscounted_unit_price: 10 USD
quantity: 2
total_price: 10 USD
undiscoutend_total_price: 20 USDWarning ⚠️
- This migration changes the value of
undiscoutend_total_price
field in the database for any order where the value is currently invalid. - For each updated order, the
ORDER_UPDATED
webhook is triggered. - Only order lines that were created from draft orders are affected, or order lines that were manually added by admins/apps after the order was created. Regular orders created from checkouts are not affected by this bug.
- This migration changes the value of