mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 14:17:59 +01:00
true anon posts have no user
This commit is contained in:
parent
da1237a32a
commit
9679897930
1 changed files with 3 additions and 1 deletions
|
@ -17,7 +17,9 @@ defmodule PhilomenaWeb.UserAttributionView do
|
|||
end
|
||||
|
||||
def user_avatar(object, class \\ "avatar--100px") do
|
||||
if object.user.avatar do
|
||||
user = object.user
|
||||
|
||||
if user and user.avatar do
|
||||
img_tag(avatar_url_root() <> object.user.avatar, class: class)
|
||||
else
|
||||
anonymous_avatar(object, class)
|
||||
|
|
Loading…
Reference in a new issue