mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-10 01:56:03 -04:00
Exclude test key notifications from:
- get all notifications by service - template usage - most recently used templates Ensures that the dashboard shows no test key data. Supplements: https://github.com/alphagov/notifications-api/pull/677 which excludes CSV data. This branches from that so is dependant.
This commit is contained in:
@@ -23,8 +23,8 @@ from app.models import (
|
||||
Permission,
|
||||
User,
|
||||
InvitedUser,
|
||||
Service
|
||||
)
|
||||
Service,
|
||||
KEY_TYPE_TEST)
|
||||
from app.statsd_decorators import statsd
|
||||
|
||||
|
||||
@@ -156,7 +156,8 @@ def _stats_for_service_query(service_id):
|
||||
Notification.status,
|
||||
func.count(Notification.id).label('count')
|
||||
).filter(
|
||||
Notification.service_id == service_id
|
||||
Notification.service_id == service_id,
|
||||
Notification.key_type != KEY_TYPE_TEST
|
||||
).group_by(
|
||||
Notification.notification_type,
|
||||
Notification.status,
|
||||
|
||||
Reference in New Issue
Block a user