Update to new-style format
This commit is contained in:
parent
60b05a0493
commit
a397bb7af6
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ def track_and_log(event_name, repo, **kwargs):
|
||||||
metadata['oauth_token_id'] = authenticated_oauth_token.id
|
metadata['oauth_token_id'] = authenticated_oauth_token.id
|
||||||
metadata['oauth_token_application_id'] = authenticated_oauth_token.application.client_id
|
metadata['oauth_token_application_id'] = authenticated_oauth_token.application.client_id
|
||||||
metadata['oauth_token_application'] = authenticated_oauth_token.application.name
|
metadata['oauth_token_application'] = authenticated_oauth_token.application.name
|
||||||
analytics_id = 'oauth:%s' % authenticated_oauth_token.id
|
analytics_id = 'oauth:{0}'.format(authenticated_oauth_token.id)
|
||||||
elif authenticated_user:
|
elif authenticated_user:
|
||||||
metadata['username'] = authenticated_user.username
|
metadata['username'] = authenticated_user.username
|
||||||
analytics_id = authenticated_user.username
|
analytics_id = authenticated_user.username
|
||||||
|
@ -38,7 +38,7 @@ def track_and_log(event_name, repo, **kwargs):
|
||||||
if authenticated_token.kind:
|
if authenticated_token.kind:
|
||||||
metadata['token_type'] = authenticated_token.kind.name
|
metadata['token_type'] = authenticated_token.kind.name
|
||||||
|
|
||||||
analytics_id = 'token:%s' % authenticated_token.code
|
analytics_id = 'token:{0}'.format(authenticated_token.code)
|
||||||
else:
|
else:
|
||||||
metadata['public'] = True
|
metadata['public'] = True
|
||||||
analytics_id = 'anonymous'
|
analytics_id = 'anonymous'
|
||||||
|
|
Reference in a new issue