Exclude test keys when searching by recipient

The activity page doesn’t show notifications sent with a test key.

However it _does_ when you search by recipient. This is confusing
and inconsistent.
This commit is contained in:
Chris Hill-Scott
2017-08-21 15:35:55 +01:00
parent 8795280ebf
commit bdc935a8b1
2 changed files with 17 additions and 3 deletions

View File

@@ -505,7 +505,8 @@ def dao_get_notifications_by_to_field(service_id, search_term, statuses=None):
filters = [
Notification.service_id == service_id,
Notification.normalised_to == normalised
Notification.normalised_to == normalised,
Notification.key_type != KEY_TYPE_TEST,
]
if statuses: