mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +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 =
|
||||
Tag
|
||||
|> where([t], t.name in ^added_tag_names)
|
||||
|> preload([:implied_tags, aliased_tag: :implied_tags])
|
||||
|> Repo.all()
|
||||
|> Enum.map(& &1.aliased_tag || &1)
|
||||
|> Enum.flat_map(&[&1 | &1.implied_tags])
|
||||
|
||||
removed_tags =
|
||||
Tag
|
||||
|
|
Loading…
Reference in a new issue