diff --git a/app/schemas.py b/app/schemas.py index 7f52b9541..a9811dfc3 100644 --- a/app/schemas.py +++ b/app/schemas.py @@ -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')