mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
Refactor to use is_precompiled_letter in letters/utils.py
This commit is contained in:
@@ -5,6 +5,7 @@ from flask import current_app
|
||||
|
||||
from notifications_utils.s3 import s3upload
|
||||
|
||||
from app.models import LETTER_TYPE
|
||||
from app.variables import Retention
|
||||
|
||||
|
||||
@@ -79,4 +80,8 @@ def get_letter_pdf(notification):
|
||||
|
||||
|
||||
def is_precompiled_letter(template):
|
||||
return template.hidden and template.name == current_app.config['PRECOMPILED_TEMPLATE_NAME']
|
||||
return (
|
||||
template.template_type == LETTER_TYPE and
|
||||
template.hidden and
|
||||
template.name == current_app.config['PRECOMPILED_TEMPLATE_NAME']
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user