mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-21 16:01:15 -05:00
use Template.is_message_too_long rather than content_count directly
this function returns false for emails and letters so we can clean up the code and reduce duplication a little bit
This commit is contained in:
@@ -49,7 +49,7 @@ def _content_count_greater_than_limit(content, template_type):
|
||||
if template_type != SMS_TYPE:
|
||||
return False
|
||||
template = SMSMessageTemplate({'content': content, 'template_type': template_type})
|
||||
return template.content_count > SMS_CHAR_COUNT_LIMIT
|
||||
return template.is_message_too_long()
|
||||
|
||||
|
||||
def validate_parent_folder(template_json):
|
||||
|
||||
Reference in New Issue
Block a user