diff --git a/endpoints/web.py b/endpoints/web.py index 46a0b1502..13f8cbc55 100644 --- a/endpoints/web.py +++ b/endpoints/web.py @@ -27,6 +27,7 @@ from util.systemlogs import build_logs_archive from auth import scopes import features +import json logger = logging.getLogger(__name__) @@ -431,16 +432,16 @@ def request_authorization_code(): # Load the application information. oauth_app = provider.get_application_for_client_id(client_id) - app_email = oauth_app.email or organization.email + app_email = oauth_app.avatar_email or oauth_app.organization.email oauth_app_view = { 'name': oauth_app.name, 'description': oauth_app.description, 'url': oauth_app.application_uri, - 'avatar': avatar.get_data(oauth_app.name, app_email, 'app'), + 'avatar': json.dumps(avatar.get_data(oauth_app.name, app_email, 'app')), 'organization': { 'name': oauth_app.organization.username, - 'avatar': avatar.get_data_for_org(oauth_app.organization) + 'avatar': json.dumps(avatar.get_data_for_org(oauth_app.organization)) } } diff --git a/templates/oauthorize.html b/templates/oauthorize.html index 0997f1e1b..42aa44e08 100644 --- a/templates/oauthorize.html +++ b/templates/oauthorize.html @@ -13,10 +13,10 @@
- +

{{ application.name }}

- {{ application.organization.name }}