mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Because dates are confusing we need to fix this query once more.
The template statistics are returning 7 days inclusive, however the big numbers on the dashboard are for 8 days. This PR fixes that.
This commit is contained in:
@@ -251,8 +251,10 @@ def delete_service_and_all_associated_db_objects(service):
|
||||
|
||||
@statsd(namespace="dao")
|
||||
def dao_fetch_stats_for_service(service_id):
|
||||
# We want 7 days inclusive
|
||||
start_date = get_london_midnight_in_utc(date.today() - timedelta(days=6))
|
||||
return _stats_for_service_query(service_id).filter(
|
||||
func.date(Notification.created_at) >= date.today() - timedelta(days=7)
|
||||
func.date(Notification.created_at) >= start_date
|
||||
).all()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user