Fix bug.
This commit is contained in:
parent
4ff65bb079
commit
069d1a315e
|
@ -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|
|
||||
|
|
Loading…
Reference in New Issue