Fix OAuth 500 error
This commit is contained in:
parent
fd65ca5916
commit
01698e8d16
2 changed files with 6 additions and 5 deletions
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
|
||||
<div class="container auth-container" ng-if="!user.anonymous">
|
||||
<div class="auth-header">
|
||||
<span class="avatar" size="48" hash="'{{ application.avatar }}'"></span>
|
||||
<span class="avatar" size="48" data="{{ application.avatar }}"></span>
|
||||
<h2><a href="{{ application.url }}" target="_blank">{{ application.name }}</a></h2>
|
||||
<h4>
|
||||
<span class="avatar" size="24" hash="'{{ application.organization.avatar }}'"
|
||||
<span class="avatar" size="24" data="{{ application.organization.avatar }}"
|
||||
style="vertical-align: middle; margin-right: 4px;"></span>
|
||||
<span style="vertical-align: middle">{{ application.organization.name }}</span>
|
||||
</h4>
|
||||
|
|
Reference in a new issue