small fix for title empty

This commit is contained in:
Harry Bomrah 2016-11-23 19:03:34 +08:00
parent 33fabb2634
commit 08059e2152
1 changed files with 3 additions and 3 deletions

View File

@ -133,8 +133,8 @@ class AnnouncementsController < ApplicationController
x = {
"bulletin_links" => links,
"bulletin_files" => files,
"title" => (fa["title_translations"][locale] rescue ""),
"subtitle" => (fa["subtitle_translations"][locale] rescue ""),
"title" => fa["title_translations"][locale],
"subtitle" => fa["subtitle_translations"][locale],
"statuses" => [status],
"category" => fa["category"],
"postdate" => fa["postdate"],
@ -149,7 +149,7 @@ class AnnouncementsController < ApplicationController
"more" => t(:more_plus),
"view_count" => ""
}
if !x["title"].empty?
if (!x["title"].empty? rescue false)
fans << x
end
end