mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Code review fix.
This commit is contained in:
@@ -122,9 +122,9 @@ class SmsTemplateNotificationSchema(SmsNotificationSchema):
|
|||||||
raise ValidationError('Invalid phone number for restricted service', 'restricted')
|
raise ValidationError('Invalid phone number for restricted service', 'restricted')
|
||||||
# Assert the template is valid for the service which made the request.
|
# Assert the template is valid for the service which made the request.
|
||||||
service = api_user['client']
|
service = api_user['client']
|
||||||
if service != current_app.config.get('ADMIN_CLIENT_USER_NAME'):
|
if (service != current_app.config.get('ADMIN_CLIENT_USER_NAME') and
|
||||||
if template.service != models.Service.query.filter_by(id=service).first():
|
template.service != models.Service.query.filter_by(id=service).first()):
|
||||||
raise ValidationError('Invalid template', 'restricted')
|
raise ValidationError('Invalid template', 'restricted')
|
||||||
|
|
||||||
|
|
||||||
class SmsAdminNotificationSchema(SmsNotificationSchema):
|
class SmsAdminNotificationSchema(SmsNotificationSchema):
|
||||||
|
|||||||
Reference in New Issue
Block a user