Update to new-style format

This commit is contained in:
Joseph Schorr 2015-07-21 15:39:23 -04:00
parent 60b05a0493
commit a397bb7af6

View file

@ -27,7 +27,7 @@ def track_and_log(event_name, repo, **kwargs):
metadata['oauth_token_id'] = authenticated_oauth_token.id
metadata['oauth_token_application_id'] = authenticated_oauth_token.application.client_id
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:
metadata['username'] = authenticated_user.username
analytics_id = authenticated_user.username
@ -38,7 +38,7 @@ def track_and_log(event_name, repo, **kwargs):
if authenticated_token.kind:
metadata['token_type'] = authenticated_token.kind.name
analytics_id = 'token:%s' % authenticated_token.code
analytics_id = 'token:{0}'.format(authenticated_token.code)
else:
metadata['public'] = True
analytics_id = 'anonymous'