mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
Fix bug with missing template version param
We were asking for the latest version of a letter template rather than the version that the notification was sent with. This mean that if you previewed a letter and had made edits to the template since it was sent you would be shown an incorrect preview.
This commit is contained in:
@@ -243,8 +243,7 @@ def preview_letter_template_by_notification_id(service_id, notification_id, file
|
||||
page = request.args.get('page')
|
||||
|
||||
notification = get_notification_by_id(notification_id)
|
||||
|
||||
template = dao_get_template_by_id(notification.template_id)
|
||||
template = dao_get_template_by_id(notification.template_id, notification.template_version)
|
||||
metadata = {}
|
||||
|
||||
if template.is_precompiled_letter:
|
||||
|
||||
Reference in New Issue
Block a user