mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Use constants for template type
Handy if we ever want to rename these I guess…
This commit is contained in:
@@ -213,7 +213,7 @@ class TemplateSchema(BaseTemplateSchema):
|
||||
@validates_schema
|
||||
def validate_type(self, data):
|
||||
template_type = data.get('template_type')
|
||||
if template_type and template_type == 'email':
|
||||
if template_type and template_type == models.EMAIL_TYPE:
|
||||
subject = data.get('subject')
|
||||
if not subject or subject.strip() == '':
|
||||
raise ValidationError('Invalid template subject', 'subject')
|
||||
|
||||
Reference in New Issue
Block a user