Fix bug.
This commit is contained in:
parent
15800258da
commit
a84765e4df
|
@ -578,6 +578,7 @@ class EventNewsModsController < ApplicationController
|
||||||
event_news = EventNews.can_display_and_sorted.where(:uid => uid).first
|
event_news = EventNews.can_display_and_sorted.where(:uid => uid).first
|
||||||
end
|
end
|
||||||
event_news = EventNews.where(:uid => uid).first if event_news.nil?
|
event_news = EventNews.where(:uid => uid).first if event_news.nil?
|
||||||
|
return nil if event_news.nil?
|
||||||
url_to_edit = OrbitHelper.user_can_edit?(event_news) ? "/admin/event_news/#{event_news.id.to_s}/edit" : ""
|
url_to_edit = OrbitHelper.user_can_edit?(event_news) ? "/admin/event_news/#{event_news.id.to_s}/edit" : ""
|
||||||
|
|
||||||
access_level = OrbitHelper.user_access_level?
|
access_level = OrbitHelper.user_access_level?
|
||||||
|
@ -671,7 +672,7 @@ class EventNewsModsController < ApplicationController
|
||||||
event_news = OrbitHelper.get_from_feed(uid)
|
event_news = 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 event_news.blank?
|
return nil if event_news.blank?
|
||||||
tags = []
|
tags = []
|
||||||
|
|
||||||
event_news["tags"].each{|tag|
|
event_news["tags"].each{|tag|
|
||||||
|
|
Loading…
Reference in New Issue