From 6017d671048e4e8d803050c533312eb05218ebf0 Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 17 Mar 2020 10:32:51 +0800 Subject: [PATCH] fix error --- app/controllers/announcements_controller.rb | 2 +- app/helpers/announcements_helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 21123ff..cca1488 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -121,7 +121,7 @@ class AnnouncementsController < ApplicationController 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) + 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) if !is_random diff --git a/app/helpers/announcements_helper.rb b/app/helpers/announcements_helper.rb index 5da2780..2350359 100644 --- a/app/helpers/announcements_helper.rb +++ b/app/helpers/announcements_helper.rb @@ -128,7 +128,7 @@ module AnnouncementsHelper announcements = Bulletin.where(:title.nin => ["",nil],:is_preview.in=>[false,nil]) .can_display_and_sorted.is_approved .filter_by_categories(categories,false).filter_by_tags(tags).to_a - if (defined? SiteFeed).nil? + if !(defined? SiteFeed).nil? feeds_anns = get_feed_announcements("index") end else