From 5c4611a3864eeb2bdae761d08163999f5be0c426 Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 31 Mar 2020 18:31:04 +0800 Subject: [PATCH] fix not using thumb error --- app/controllers/announcements_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index cca1488..89469bb 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -116,11 +116,11 @@ class AnnouncementsController < ApplicationController subpart = OrbitHelper.get_current_widget anns_cache = AnnsCache.where(parent_id: subpart.id,locale: I18n.locale.to_s) widget_data_count = OrbitHelper.widget_data_count + set_image_version_for_widget if !(defined? SiteFeed).nil? || anns_cache.count != 1 || is_random page = Page.where(:module => "announcement").first rescue nil Bulletin.remove_expired_status uid = OrbitHelper.params[:uid] rescue "" - set_image_version_for_widget sorted_anns = Bulletin.where(:title.nin => ["",nil],:is_preview.in=>[false,nil], :uid.ne => uid) .can_display_and_sorted.is_approved .filter_by_widget_categories(cats,false).filter_by_tags(tags)