IndexError in BasketSummaryView - line.has_discount vs. basket.applied_offers
We hit this "list index out of range" error recently in BasketSummaryView._process_basket_lines, but the offending line of code has not been touched in 2 years. The logic assumes that if a basket line's has_discount property is true then it's applied_offers() will have at least on item. The OpsGenie alert for this was only a a P1 because the 12 occurrences of this constituted a significant percentage of all requests over a 5 minute period.
Steps to Reproduce
Reason for Variance
User Impact Summary
: I don't know if this has additional details you'll need, but please close as duplicate and bring in whatever info is useful. Thank you.