mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
require that the tag not be an alias
This commit is contained in:
parent
5d4f8f83f6
commit
64884b3dc8
1 changed files with 2 additions and 1 deletions
|
@ -78,9 +78,10 @@ defmodule PhilomenaWeb.ImageLoader do
|
|||
Tag
|
||||
|> join(:left, [t], at in Tag, on: t.id == at.aliased_tag_id)
|
||||
|> where([t, at], t.name in ^tags or at.name in ^tags)
|
||||
|> preload([:aliases, :implied_tags, :implied_by_tags, :dnp_entries, public_links: :user])
|
||||
|> preload([:aliases, :aliased_tag, :implied_tags, :implied_by_tags, :dnp_entries, public_links: :user])
|
||||
|> Repo.all()
|
||||
|> Enum.uniq_by(& &1.id)
|
||||
|> Enum.filter(&is_nil(&1.aliased_tag))
|
||||
end
|
||||
|
||||
defp render_bodies([], _conn), do: []
|
||||
|
|
Loading…
Reference in a new issue