mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-20 06:37:59 +01:00
fixes #118, alias channel associated tags too
This commit is contained in:
parent
6a708f11b6
commit
64dd6d061c
1 changed files with 5 additions and 0 deletions
|
@ -17,6 +17,7 @@ defmodule Philomena.Tags do
|
||||||
alias Philomena.Images.Tagging
|
alias Philomena.Images.Tagging
|
||||||
alias Philomena.UserLinks.UserLink
|
alias Philomena.UserLinks.UserLink
|
||||||
alias Philomena.DnpEntries.DnpEntry
|
alias Philomena.DnpEntries.DnpEntry
|
||||||
|
alias Philomena.Channels.Channel
|
||||||
|
|
||||||
@spec get_or_create_tags(String.t()) :: List.t()
|
@spec get_or_create_tags(String.t()) :: List.t()
|
||||||
def get_or_create_tags(tag_list) do
|
def get_or_create_tags(tag_list) do
|
||||||
|
@ -214,6 +215,10 @@ defmodule Philomena.Tags do
|
||||||
|> where(tag_id: ^tag.id)
|
|> where(tag_id: ^tag.id)
|
||||||
|> Repo.update_all(set: [tag_id: target_tag.id])
|
|> Repo.update_all(set: [tag_id: target_tag.id])
|
||||||
|
|
||||||
|
Channel
|
||||||
|
|> where(associated_artist_tag_id: ^tag.id)
|
||||||
|
|> Repo.update_all(set: [associated_artist_tag_id: target_tag.id])
|
||||||
|
|
||||||
# Update counter
|
# Update counter
|
||||||
Tag
|
Tag
|
||||||
|> where(id: ^tag.id)
|
|> where(id: ^tag.id)
|
||||||
|
|
Loading…
Reference in a new issue