mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27: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
|
end
|
||||||
|
|
||||||
def user_avatar(object, class \\ "avatar--100px") do
|
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)
|
img_tag(avatar_url_root() <> object.user.avatar, class: class)
|
||||||
else
|
else
|
||||||
anonymous_avatar(object, class)
|
anonymous_avatar(object, class)
|
||||||
|
|
Loading…
Reference in a new issue