diff --git a/app/main/views/send.py b/app/main/views/send.py index 8778e53d6..271d8870f 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -798,13 +798,13 @@ def check_messages(service_id, template_id, upload_id, row_index=2): data["recipients_remaining_messages"] = remaining_email_this_year data["send_exceeds_annual_limit"] = True else: - data["send_exceeds_daily_limit"] = data["recipients"].sms_fragment_count > data["sms_parts_remaining"] + data["send_exceeds_daily_limit"] = data["recipients"].sms_fragment_count > data["sms_parts_remaining"] else: if remaining_sms_this_year < data["count_of_recipients"]: data["recipients_remaining_messages"] = remaining_sms_this_year data["send_exceeds_annual_limit"] = True else: - data["send_exceeds_daily_limit"] = data["recipients"].sms_fragment_count > data["sms_parts_remaining"] + data["send_exceeds_daily_limit"] = data["recipients"].sms_fragment_count > data["sms_parts_remaining"] if ( data["recipients"].too_many_rows diff --git a/app/notify_client/template_statistics_api_client.py b/app/notify_client/template_statistics_api_client.py index 429bdcd31..fb6acbc13 100644 --- a/app/notify_client/template_statistics_api_client.py +++ b/app/notify_client/template_statistics_api_client.py @@ -19,9 +19,9 @@ def get_template_statistics_for_template(self, service_id, template_id): return self.get(url="/service/{}/template-statistics/{}".format(service_id, template_id))["data"] - template_statistics_client = TemplateStatisticsApiClient() + class TemplateStatistics: def __init__(self, stats): self.stats = stats diff --git a/gunicorn_config.py b/gunicorn_config.py index 63325ca38..cf6e5e711 100644 --- a/gunicorn_config.py +++ b/gunicorn_config.py @@ -51,6 +51,7 @@ # Start timer for total running time start_time = time.time() + def on_starting(server): server.log.info("Starting Notifications Admin")