fix error

This commit is contained in:
邱博亞 2021-11-09 20:00:34 +08:00
parent 12a52c2b8c
commit 54f16a493e
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ class SiteFeedAnnc
I18n.available_locales.each do |locale|
index({ "all_contents_for_feed.#{locale}.is_hidden"=> -1,
"all_contents_for_feed.#{locale}.is_top"=> -1,
"all_contents_for_feed.#{locale}.postdate"=> -1}, { unique: false, background: true })
"all_contents_for_feed.#{locale}.postdate"=> -1}, { unique: false, background: true, name: "cache_#{locale}" })
end
def get_annc(annc_uid)
Array(self[:all_contents_for_feed]).select{|v| v['id']==annc_uid}[0] rescue {}