mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Use service model to look up service attributes
This is better than just keying into the JSON because it means you get an exception straight away when looking up a key that doesn’t exist (which via mocking you could ordinarily miss).
This commit is contained in:
@@ -238,7 +238,7 @@ def inbox_download(service_id):
|
||||
|
||||
def get_inbox_partials(service_id):
|
||||
page = int(request.args.get('page', 1))
|
||||
if 'inbound_sms' not in current_service['permissions']:
|
||||
if not current_service.has_permission('inbound_sms'):
|
||||
abort(403)
|
||||
|
||||
inbound_messages_data = service_api_client.get_most_recent_inbound_sms(service_id, page=page)
|
||||
|
||||
Reference in New Issue
Block a user