Avoid key errors by setting the year_start with 2020 or 2021

Remove db.create_service_with_organisation method
Update comment in command
This commit is contained in:
Rebecca Law
2021-03-30 09:08:04 +01:00
parent 7da5abc17b
commit da8a7a8db1
4 changed files with 9 additions and 11 deletions

View File

@@ -90,6 +90,10 @@ def set_default_free_allowance_for_service(service, year_start=None):
}
if not year_start:
year_start = get_current_financial_year_start_year()
if year_start < 2020:
year_start = 2020
if year_start > 2021:
year_start = 2021
if service.organisation_type:
free_allowance = default_free_sms_fragment_limits[service.organisation_type][year_start]
else: