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
|
announcement = Bulletin.can_display_and_sorted.where(:uid => uid).first
|
||||||
end
|
end
|
||||||
announcement = Bulletin.where(:uid => uid).first if announcement.nil?
|
announcement = Bulletin.where(:uid => uid).first if announcement.nil?
|
||||||
|
return nil if announcement.nil?
|
||||||
@bulletin = announcement
|
@bulletin = announcement
|
||||||
|
|
||||||
url_to_edit = OrbitHelper.user_can_edit?(announcement) ? "/admin/announcements/#{announcement.id.to_s}/edit" : ""
|
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)
|
announcement = OrbitHelper.get_from_feed(uid)
|
||||||
locale = OrbitHelper.get_site_locale.to_s
|
locale = OrbitHelper.get_site_locale.to_s
|
||||||
url_to_edit = "#"
|
url_to_edit = "#"
|
||||||
return {} if announcement.blank?
|
return nil if announcement.blank?
|
||||||
tags = []
|
tags = []
|
||||||
|
|
||||||
announcement["tags"].each{|tag|
|
announcement["tags"].each{|tag|
|
||||||
|
|
Loading…
Reference in New Issue