mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
batch tagger should resolve aliases and implications
This commit is contained in:
parent
8e39c06940
commit
11e908ef14
1 changed files with 3 additions and 0 deletions
|
@ -22,7 +22,10 @@ defmodule PhilomenaWeb.Admin.Batch.TagController do
|
||||||
added_tags =
|
added_tags =
|
||||||
Tag
|
Tag
|
||||||
|> where([t], t.name in ^added_tag_names)
|
|> where([t], t.name in ^added_tag_names)
|
||||||
|
|> preload([:implied_tags, aliased_tag: :implied_tags])
|
||||||
|> Repo.all()
|
|> Repo.all()
|
||||||
|
|> Enum.map(& &1.aliased_tag || &1)
|
||||||
|
|> Enum.flat_map(&[&1 | &1.implied_tags])
|
||||||
|
|
||||||
removed_tags =
|
removed_tags =
|
||||||
Tag
|
Tag
|
||||||
|
|
Loading…
Reference in a new issue