fix bad match

This commit is contained in:
byte[] 2019-12-20 14:06:55 -05:00
parent 0d8e1c5ceb
commit b5f3f98b9c

View file

@ -145,6 +145,13 @@ defmodule PhilomenaWeb.ImageController do
|> preload([:tags, :deleter, user: [awards: :badge]])
|> select([i, t, s], {i, t.count, s.count})
|> Repo.one()
|> case do
nil ->
{nil, nil, nil}
result ->
result
end
cond do
is_nil(image) ->