Update the fetch_monthly_billing_for year to only update ft_billing for the notification types the service as permission to send to.

This commit is contained in:
Rebecca Law
2020-02-20 16:08:57 +00:00
parent ca010ac4cb
commit 009dcd0860

View File

@@ -245,7 +245,7 @@ def fetch_monthly_billing_for_year(service_id, year):
if year_end_date >= today:
yesterday = today - timedelta(days=1)
for day in [yesterday, today]:
data = fetch_billing_data_for_day(process_day=day, service_id=service_id)
data = fetch_billing_data_for_day(process_day=day, service_id=service_id, check_permissions=True)
for d in data:
update_fact_billing(data=d, process_day=day)