Remove redundant join

This was left over from when we needed to tell if a notification was
sent by a crown or non-crown service.
This commit is contained in:
Katie Smith
2021-05-06 09:34:46 +01:00
parent 8365c749e4
commit 8a34dccda0

View File

@@ -750,9 +750,7 @@ def dao_get_letters_to_be_printed(print_run_deadline, postage, query_limit=10000
https://docs.sqlalchemy.org/en/13/orm/query.html?highlight=yield_per#sqlalchemy.orm.query.Query.yield_per
https://www.mail-archive.com/sqlalchemy@googlegroups.com/msg12443.html
"""
notifications = Notification.query.join(
Notification.service
).filter(
notifications = Notification.query.filter(
Notification.created_at < convert_bst_to_utc(print_run_deadline),
Notification.notification_type == LETTER_TYPE,
Notification.status == NOTIFICATION_CREATED,