mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
Return iterator from query for speed
This commit is contained in:
@@ -225,7 +225,7 @@ def get_notification_billable_unit_count_per_month(service_id, year):
|
||||
NotificationHistory.service_id == service_id,
|
||||
NotificationHistory.created_at >= start,
|
||||
NotificationHistory.created_at < end
|
||||
).all()
|
||||
)
|
||||
|
||||
return [
|
||||
(month, sum(count for _, count in row))
|
||||
|
||||
Reference in New Issue
Block a user