From b09132c92505af5905aa0aac5c662fcde304c961 Mon Sep 17 00:00:00 2001 From: JiangRu Date: Tue, 14 Apr 2015 18:53:44 +0800 Subject: [PATCH] fix if awarding_unit is empty --- app/controllers/personal_honors_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/personal_honors_controller.rb b/app/controllers/personal_honors_controller.rb index 5fd9ce2..0729892 100644 --- a/app/controllers/personal_honors_controller.rb +++ b/app/controllers/personal_honors_controller.rb @@ -5,7 +5,7 @@ class PersonalHonorsController < ApplicationController { "year" => honor.year, "award_name" => honor.award_name, - "awarding_unit" => honor.awarding_unit, + "awarding_unit" => (honor.awarding_unit rescue ""), "award_winner" => (honor.member_profile.name rescue ""), "link_to_show" => OrbitHelper.url_to_show(honor.to_param) }