posts/index: fix empty paginator when searching for aliased tags.

This commit is contained in:
evazion
2020-04-29 19:33:13 -05:00
parent e978f07068
commit 828347dfc5
2 changed files with 2 additions and 2 deletions

View File

@@ -849,5 +849,5 @@ class PostQueryBuilder
end
end
memoize :scan_query, :split_query
memoize :scan_query, :split_query, :normalize_query
end

View File

@@ -1070,7 +1070,7 @@ class Post < ApplicationRecord
tags = tags.to_s
tags += " rating:s" if CurrentUser.safe_mode?
tags += " -status:deleted" if CurrentUser.hide_deleted_posts? && !PostQueryBuilder.new(tags).has_metatag?("status")
tags = PostQueryBuilder.new(tags).normalize_query
tags = PostQueryBuilder.new(tags).normalize_query(normalize_aliases: true)
# Optimize some cases. these are just estimates but at these
# quantities being off by a few hundred doesn't matter much