Match on partial email addresses in search

Users expect the search to work on partial email addresses ‘similar to
Gov.Pay’. We can’t have a situation where Pay are doing something better
than us 😜
This commit is contained in:
Chris Hill-Scott
2018-03-06 11:38:40 +00:00
parent 4767379fc7
commit 209d75efd9
2 changed files with 16 additions and 1 deletions

View File

@@ -446,7 +446,7 @@ 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.like("%{}%".format(normalised)),
Notification.key_type != KEY_TYPE_TEST,
]