From f8f3212b7a15e411a879966f48116d16e2ae8e0c Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 3 Oct 2014 14:16:14 +0800 Subject: [PATCH] fix for frontend --- app/controllers/personal_patents_controller.rb | 2 +- app/models/patent.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/personal_patents_controller.rb b/app/controllers/personal_patents_controller.rb index bf1e541..63ce718 100644 --- a/app/controllers/personal_patents_controller.rb +++ b/app/controllers/personal_patents_controller.rb @@ -7,7 +7,7 @@ class PersonalPatentsController < ApplicationController "patent_title" => patent.patent_title, "patent_no" => patent.patent_no, "patent_country" => patent.patent_country, - "authors" => patent.member_profile.name, + "authors" => (patent.member_profile.name rescue ""), "link_to_show" => OrbitHelper.url_to_show(patent.to_param) } end diff --git a/app/models/patent.rb b/app/models/patent.rb index 6d28bc5..5796a9a 100644 --- a/app/models/patent.rb +++ b/app/models/patent.rb @@ -32,7 +32,7 @@ class Patent 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