Fix #3639: Favorite count pixiv tags aren't skipped by translated tags.

This commit is contained in:
evazion
2018-04-13 22:39:52 -05:00
parent f2adbba241
commit 302994e5d9
3 changed files with 12 additions and 1 deletions

View File

@@ -83,6 +83,8 @@ module Sources
# Given a tag from the source site, should return an array of corresponding Danbooru tags.
def translate_tag(untranslated_tag)
return [] if untranslated_tag.blank?
translated_tag_names = WikiPage.active.other_names_equal(untranslated_tag).uniq.pluck(:title)
translated_tag_names = TagAlias.to_aliased(translated_tag_names)
translated_tags = Tag.where(name: translated_tag_names)