mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 07:21:13 -05:00
add day filter to template usage dao, and remove NotificationHistory
we should be very careful with when we get data from NotificationHistory - this should probably only be from scheduled tasks. `dao_get_template_usage` is only called from the template statistics rest endpoint, so shouldn't ever hit template history. also, moved tests out to new file to break up the 2k test file a bit
This commit is contained in:
@@ -35,7 +35,7 @@ def get_template_statistics_for_service_by_day(service_id):
|
||||
message = {'limit_days': [error]}
|
||||
raise InvalidRequest(message, status_code=400)
|
||||
else:
|
||||
limit_days = None
|
||||
limit_days = 7
|
||||
|
||||
if limit_days == 7:
|
||||
stats = get_template_statistics_for_7_days(limit_days, service_id)
|
||||
|
||||
Reference in New Issue
Block a user