Merge pull request #3826 from alphagov/add-new-rates-for-2021-financial-year

Add new free allowance rates for 2021 financial year
This commit is contained in:
Chris Hill-Scott
2021-03-10 14:41:58 +00:00
committed by GitHub
5 changed files with 86 additions and 19 deletions

View File

@@ -6,11 +6,21 @@ from app import billing_api_client, service_api_client
from app.formatters import email_safe
from app.main import main
from app.main.forms import CreateNhsServiceForm, CreateServiceForm
from app.utils import user_is_gov_user, user_is_logged_in
from app.utils import (
get_current_financial_year,
user_is_gov_user,
user_is_logged_in,
)
def _create_service(service_name, organisation_type, email_from, form):
free_sms_fragment_limit = current_app.config['DEFAULT_FREE_SMS_FRAGMENT_LIMITS'].get(organisation_type)
free_sms_fragment_limit = current_app.config[
'DEFAULT_FREE_SMS_FRAGMENT_LIMITS'
][
organisation_type
][
get_current_financial_year()
]
try:
service_id = service_api_client.create_service(