fix error

This commit is contained in:
邱博亞 2021-10-21 10:59:08 +08:00
parent 38ab0c654c
commit 98e6860af2
1 changed files with 4 additions and 1 deletions

View File

@ -20,7 +20,10 @@ class SiteFeedAnnc
Array(self[:all_contents_for_feed]).collect do |v|
tmp = v
if hidden_annc.exclude?(v['id']) && !tmp["title_translations"][locale].blank?
if self.channel_key == "announcement" && (tmp["postdate"].blank? || tmp["postdate"].to_time<=Time.now)
if self.channel_key == "announcement"
if (!tmp["postdate"].blank? && tmp["postdate"].to_time>Time.now)
next
end
tmp['statuses'] = []
if self[:top_list].count == 0 || self[:top_list].exclude?(tmp['id'])
tmp[:is_top] = false