mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -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:
@@ -104,8 +104,8 @@ def feedback(ticket_type):
|
||||
user_name = form.name.data or None
|
||||
if current_service:
|
||||
service_string = 'Service: "{name}"\n{url}\n'.format(
|
||||
name=current_service['name'],
|
||||
url=url_for('main.service_dashboard', service_id=current_service['id'], _external=True)
|
||||
name=current_service.name,
|
||||
url=url_for('main.service_dashboard', service_id=current_service.id, _external=True)
|
||||
)
|
||||
else:
|
||||
service_string = ''
|
||||
|
||||
Reference in New Issue
Block a user