This commit is contained in:
BoHung Chiu 2022-06-04 14:55:30 +08:00
parent ec3b3b41a4
commit 6de2659b04
1 changed files with 1 additions and 1 deletions

View File

@ -555,7 +555,7 @@ class AnnouncementsController < ApplicationController
subpart = OrbitHelper.get_current_widget
widget_data_count = OrbitHelper.widget_data_count
anns_cache = AnnsCache.where(parent_id: subpart.id.to_s + cats.to_s + tags.to_s + widget_data_count.to_s,locale: I18n.locale.to_s)
devide_flag = (!(defined? SiteFeed).nil?)
devide_flag = (!(defined? SiteFeed).nil?) && (SiteFeed.count != 0)
anns_cache.all_of([{:invalid_date.ne=>nil},{:invalid_date.lte => Time.now}]).destroy
count = anns_cache.count
if count > 1