This commit is contained in:
BoHung Chiu 2022-11-25 00:13:30 +08:00
parent 4ff65bb079
commit 069d1a315e
1 changed files with 2 additions and 1 deletions

View File

@ -674,6 +674,7 @@ class AnnouncementsController < ApplicationController
announcement = Bulletin.can_display_and_sorted.where(:uid => uid).first
end
announcement = Bulletin.where(:uid => uid).first if announcement.nil?
return nil if announcement.nil?
@bulletin = announcement
url_to_edit = OrbitHelper.user_can_edit?(announcement) ? "/admin/announcements/#{announcement.id.to_s}/edit" : ""
@ -819,7 +820,7 @@ class AnnouncementsController < ApplicationController
announcement = OrbitHelper.get_from_feed(uid)
locale = OrbitHelper.get_site_locale.to_s
url_to_edit = "#"
return {} if announcement.blank?
return nil if announcement.blank?
tags = []
announcement["tags"].each{|tag|