Fix aggregate stats dao function to use start_date

Now using start_date to determine which table to query.
This commit is contained in:
Katie Smith
2018-07-03 09:26:02 +01:00
parent e1a7d99c72
commit 4228b77ebb
2 changed files with 1 additions and 15 deletions

View File

@@ -621,7 +621,7 @@ def fetch_aggregate_stats_by_date_range_for_all_services(start_date, end_date):
end_date = get_london_midnight_in_utc(end_date + timedelta(days=1))
table = NotificationHistory
if end_date >= datetime.utcnow() - timedelta(days=7):
if start_date >= datetime.utcnow() - timedelta(days=7):
table = Notification
query = db.session.query(