mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-11 17:38:02 -04:00
remove comments
This commit is contained in:
@@ -455,7 +455,6 @@ def dao_fetch_stats_for_service_from_days(service_id, start_date, end_date):
|
||||
start_date = get_midnight_in_utc(start_date)
|
||||
end_date = get_midnight_in_utc(end_date + timedelta(days=1))
|
||||
|
||||
# Subquery for daily total notifications
|
||||
total_substmt = (
|
||||
select(
|
||||
func.date_trunc("day", NotificationAllTimeView.created_at).label("day"),
|
||||
@@ -478,7 +477,6 @@ def dao_fetch_stats_for_service_from_days(service_id, start_date, end_date):
|
||||
.subquery()
|
||||
)
|
||||
|
||||
# Query for daily total notifications
|
||||
total_stmt = select(
|
||||
total_substmt.c.day,
|
||||
func.sum(total_substmt.c.notification_count).label("total_notifications"),
|
||||
@@ -486,12 +484,10 @@ def dao_fetch_stats_for_service_from_days(service_id, start_date, end_date):
|
||||
total_substmt.c.day
|
||||
)
|
||||
|
||||
# Execute both queries
|
||||
total_notifications = {
|
||||
row.day: row.total_notifications for row in db.session.execute(total_stmt).all()
|
||||
}
|
||||
|
||||
# Query for breakdown by notification type and status
|
||||
stmt = (
|
||||
select(
|
||||
NotificationAllTimeView.notification_type,
|
||||
|
||||
@@ -687,7 +687,6 @@ def get_single_month_notification_stats_for_service(service_id):
|
||||
month_year = datetime(year, month, 10, 00, 00, 00)
|
||||
start_date, end_date = get_month_start_and_end_date_in_utc(month_year)
|
||||
|
||||
# First element is total notifications used elsewhere.
|
||||
__, results = dao_fetch_stats_for_service_from_days(
|
||||
service_id, start_date, end_date
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user