Skip to content

Commit

Permalink
Failsafe avatar helper part2
Browse files Browse the repository at this point in the history
  • Loading branch information
noirbizarre committed May 27, 2015
1 parent e997f3a commit b294eaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion udata/frontend/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def avatar(user, size, classes=''):
</a>
'''.format(
title=getattr(user, 'fullname', _('Anonymous user')),
url=url_for('users.show', user=user),
url=url_for('users.show', user=user) if user and getattr(user, 'id', None) else '#',
size=size,
avatar_url=avatar_url(user, size),
classes=classes
Expand Down

0 comments on commit b294eaa

Please sign in to comment.