Simplify the get_free_sms_fragment limit for the case when the row is

missing, by setting the free allowance to the default.
This commit is contained in:
Rebecca Law
2021-04-19 13:29:04 +01:00
parent bcd1939179
commit ae57521b39
3 changed files with 28 additions and 64 deletions

View File

@@ -102,7 +102,7 @@ def set_default_free_allowance_for_service(service, year_start=None):
f"{default_free_sms_fragment_limits['other'][year_start]}")
free_allowance = default_free_sms_fragment_limits['other'][year_start]
dao_create_or_update_annual_billing_for_year(
return dao_create_or_update_annual_billing_for_year(
service.id,
free_allowance,
year_start