From 0a7890f069faad3330258c9a5bc7dbd784ddf85d Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Wed, 26 Jul 2017 09:43:25 +0100 Subject: [PATCH] Use the right date for the billing month. --- app/celery/scheduled_tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/celery/scheduled_tasks.py b/app/celery/scheduled_tasks.py index 08433e017..f7649d098 100644 --- a/app/celery/scheduled_tasks.py +++ b/app/celery/scheduled_tasks.py @@ -298,5 +298,5 @@ def populate_monthly_billing(): # this will overwrite the existing amount. yesterday = datetime.utcnow() - timedelta(days=1) start_date, end_date = get_month_start_end_date(yesterday) - services = get_service_ids_that_need_sms_billing_populated(start_date, end_date=end_date) - [create_or_update_monthly_billing_sms(service_id=s.service_id, billing_month=start_date) for s in services] + services = get_service_ids_that_need_sms_billing_populated(start_date=start_date, end_date=end_date) + [create_or_update_monthly_billing_sms(service_id=s.service_id, billing_month=end_date) for s in services]