Fix a bug with anonymous pull.

This commit is contained in:
yackob03 2013-10-03 19:18:03 -04:00
parent dd548c91ab
commit 8d40f12165

View file

@ -180,7 +180,11 @@ def get_repository_images(namespace, repository):
resp = make_response(json.dumps(all_images), 200)
resp.mimetype = 'application/json'
mixpanel.track(get_authenticated_user().username, 'pull_repo')
pull_username = 'anonymous'
if get_authenticated_user():
pull_username = get_authenticated_user().username
mixpanel.track(pull_username, 'pull_repo')
return resp