mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
fix bad match
This commit is contained in:
parent
0d8e1c5ceb
commit
b5f3f98b9c
1 changed files with 7 additions and 0 deletions
|
@ -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) ->
|
||||
|
|
Loading…
Reference in a new issue