From 877b622c1348c2d073dc7a077ca76a72c12944c3 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 3 Oct 2014 14:13:07 +0800 Subject: [PATCH] fix for frontend --- app/controllers/personal_honors_controller.rb | 2 +- app/models/honor.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/personal_honors_controller.rb b/app/controllers/personal_honors_controller.rb index e06cfb4..72c1e7a 100644 --- a/app/controllers/personal_honors_controller.rb +++ b/app/controllers/personal_honors_controller.rb @@ -6,7 +6,7 @@ class PersonalHonorsController < ApplicationController "year" => honor.year, "award_name" => honor.award_name, "awarding_unit" => honor.awarding_unit, - "award_winner" => honor.member_profile.name, + "award_winner" => (honor.member_profile.name rescue ""), "link_to_show" => OrbitHelper.url_to_show(honor.to_param) } end diff --git a/app/models/honor.rb b/app/models/honor.rb index a1486d6..1a6bd1a 100644 --- a/app/models/honor.rb +++ b/app/models/honor.rb @@ -29,7 +29,7 @@ class Honor def get_plugin_data(fields_to_show) plugin_datas = [] fields_to_show.each do |field| - plugin_data = self.get_plugin_field_data(field) + plugin_data = self.get_plugin_field_data(field) rescue nil next if plugin_data.blank? or plugin_data['value'].blank? plugin_datas << plugin_data end