mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
Remove redundant assignment
This variable is used exactly once, on the next line 🤔
This commit is contained in:
@@ -212,8 +212,7 @@ class TemplateSchema(BaseTemplateSchema):
|
|||||||
|
|
||||||
@validates_schema
|
@validates_schema
|
||||||
def validate_type(self, data):
|
def validate_type(self, data):
|
||||||
template_type = data.get('template_type')
|
if data.get('template_type') in [models.EMAIL_TYPE, models.LETTER_TYPE]:
|
||||||
if template_type and template_type == models.EMAIL_TYPE:
|
|
||||||
subject = data.get('subject')
|
subject = data.get('subject')
|
||||||
if not subject or subject.strip() == '':
|
if not subject or subject.strip() == '':
|
||||||
raise ValidationError('Invalid template subject', 'subject')
|
raise ValidationError('Invalid template subject', 'subject')
|
||||||
|
|||||||
Reference in New Issue
Block a user