From 456a9da33a6726a4062f6d578e3224d79ca255de Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 3 Oct 2014 14:12:35 +0800 Subject: [PATCH] fix for frontend --- app/controllers/personal_diplomas_controller.rb | 2 +- app/models/diploma.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/personal_diplomas_controller.rb b/app/controllers/personal_diplomas_controller.rb index 92c3f7d..828cd61 100644 --- a/app/controllers/personal_diplomas_controller.rb +++ b/app/controllers/personal_diplomas_controller.rb @@ -3,7 +3,7 @@ class PersonalDiplomasController < ApplicationController diplomas = Diploma.where(:is_hidden=>false).order_by(:end_date=>'desc', :start_date=>'desc').page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count) diploma_list = diplomas.collect do |diploma| { - "member" => diploma.member_profile.name, + "member" => (diploma.member_profile.name rescue ""), "duration" => diploma.duration, "school_name" => diploma.school_name, "degree" => diploma.degree, diff --git a/app/models/diploma.rb b/app/models/diploma.rb index ff47e27..982150f 100644 --- a/app/models/diploma.rb +++ b/app/models/diploma.rb @@ -40,7 +40,7 @@ class Diploma 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