mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
More import adjustments.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -702,9 +702,7 @@ def get_specific_days_stats(results, start_date, days=None, end_date=None):
|
|||||||
else:
|
else:
|
||||||
raise ValueError("Either days or end_date must be set.")
|
raise ValueError("Either days or end_date must be set.")
|
||||||
|
|
||||||
grouped_results = {
|
grouped_results = {date: [] for date in gen_range} | {
|
||||||
date: [] for date in gen_range
|
|
||||||
} | {
|
|
||||||
day.date(): [notification_type, status, day, count]
|
day.date(): [notification_type, status, day, count]
|
||||||
for notification_type, status, day, count in results
|
for notification_type, status, day, count in results
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,10 +17,7 @@ from app.dao.api_key_dao import (
|
|||||||
save_model_api_key,
|
save_model_api_key,
|
||||||
)
|
)
|
||||||
from app.dao.dao_utils import dao_rollback, transaction
|
from app.dao.dao_utils import dao_rollback, transaction
|
||||||
from app.dao.date_util import (
|
from app.dao.date_util import get_calendar_year, get_month_start_and_end_date_in_utc
|
||||||
get_calendar_year,
|
|
||||||
get_month_start_and_end_date_in_utc,
|
|
||||||
)
|
|
||||||
from app.dao.fact_notification_status_dao import (
|
from app.dao.fact_notification_status_dao import (
|
||||||
fetch_monthly_template_usage_for_service,
|
fetch_monthly_template_usage_for_service,
|
||||||
fetch_notification_status_for_service_by_month,
|
fetch_notification_status_for_service_by_month,
|
||||||
|
|||||||
Reference in New Issue
Block a user