fix error

This commit is contained in:
chiu 2020-03-17 10:32:51 +08:00
parent d834b63a7f
commit 6017d67104
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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