Merge pull request #2814 from alphagov/search-letters

Let users search for letters
This commit is contained in:
Chris Hill-Scott
2020-04-27 15:06:32 +01:00
committed by GitHub
7 changed files with 108 additions and 26 deletions

View File

@@ -342,10 +342,9 @@ def save_letter(
):
notification = encryption.decrypt(encrypted_notification)
# we store the recipient as just the first item of the person's address
recipient = PostalAddress.from_personalisation(
Columns(notification['personalisation'])
).normalised_lines[0]
).normalised
service = dao_fetch_service_by_id(service_id)
template = dao_get_template_by_id(notification['template'], version=notification['template_version'])