Fix #4508: Specific tag not showing a wiki.

Fix the wiki excerpt not appearing when searching for a tag that doesn't
exist in the tag list. This could happen if someone created a wiki for a
tag that has never been used on a post.
This commit is contained in:
evazion
2020-06-27 02:01:34 -05:00
parent f06e322dc0
commit ff096b8adc
2 changed files with 9 additions and 3 deletions

View File

@@ -24,9 +24,8 @@ module PostSets
end
def wiki_page
return nil unless tag.present? && tag.wiki_page.present?
return nil unless !tag.wiki_page.is_deleted?
tag.wiki_page
return nil unless normalized_query.has_single_tag?
@wiki_page ||= WikiPage.undeleted.find_by(title: normalized_query.tags.first.name)
end
def tag