fix error

This commit is contained in:
邱博亞 2021-10-21 13:41:51 +08:00
parent 111dad12c4
commit dff1cf4b1a
2 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ module EventNewsHelper
links = fa["event_news_links"].map{|link| { "link_url" => link["url"], "link_title" => (link["title_translations"][locale].blank? ? link["url"] : link["title_translations"][locale]) } } rescue []
event_time_formated = a.event_time_formated
s = DateTime.parse(fa["event_date"]) rescue nil
e = DateTime.parse(fa["end_date"]) rescue nil
e = DateTime.parse(fa["event_end_date"]) rescue nil
if s.blank? && e.blank?
event_time_formated = ""
elsif s.blank?

View File

@ -106,7 +106,7 @@ class EventNews
end
def event_time_formated
s = self.event_date
e = self.end_date
e = self.event_end_date
if s.blank? && e.blank?
""
elsif s.blank?