mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 08:21:13 -05:00
Refactor is_precompiled_letter to model
This commit is contained in:
@@ -21,7 +21,7 @@ from app.dao.templates_dao import (
|
||||
dao_get_template_by_id)
|
||||
from notifications_utils.template import SMSMessageTemplate
|
||||
from app.dao.services_dao import dao_fetch_service_by_id
|
||||
from app.letters.utils import get_letter_pdf, is_precompiled_letter
|
||||
from app.letters.utils import get_letter_pdf
|
||||
from app.models import SMS_TYPE
|
||||
from app.notifications.validators import service_has_permission, check_reply_to
|
||||
from app.schemas import (template_schema, template_history_schema)
|
||||
@@ -199,7 +199,7 @@ def preview_letter_template_by_notification_id(service_id, notification_id, file
|
||||
|
||||
template = dao_get_template_by_id(notification.template_id)
|
||||
|
||||
if is_precompiled_letter(template):
|
||||
if template.is_precompiled_letter:
|
||||
|
||||
try:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user