learning-unlimited / ESP-Website

A website to help manage the logistics of large, short-term educational programs
82 stars 57 forks source link

Fix missing sibling discount bug #3629

Closed willgearty closed 1 year ago

willgearty commented 1 year ago

This makes the following changes:

  1. When program settings are saved, the sibling discount tag and line item will always be set (before, they were not set if the setting was left blank)
  2. To double ensure that this bug is no longer an issue, if the line item still doesn't exist, we then return None instead of erroring. This case is already handled within the credit card module by the filter in this line: https://github.com/learning-unlimited/ESP-Website/blob/5e7715948d4cf3bc7f91e8562f3aae93ecca13fb/esp/esp/program/modules/handlers/creditcardmodule_stripe.py#L173

Fixes https://github.com/learning-unlimited/ESP-Website/issues/3628.