From 742adb814db6676a141d85b616f42fa69e127890 Mon Sep 17 00:00:00 2001 From: Bohung Date: Wed, 26 Jan 2022 19:57:55 +0800 Subject: [PATCH] Fix bug. --- app/views/admin/cancerpredicts/showSubmit.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/cancerpredicts/showSubmit.html.erb b/app/views/admin/cancerpredicts/showSubmit.html.erb index ecde224..885ec2b 100644 --- a/app/views/admin/cancerpredicts/showSubmit.html.erb +++ b/app/views/admin/cancerpredicts/showSubmit.html.erb @@ -33,7 +33,7 @@ <% result.result.each do |key,value| %> <% @key_len %> <% if key != "locale" %> - <% if result.values[key][I18n.locale.to_s].length == 0 %> + <% if (result.values[key][I18n.locale.to_s].length == 0 rescue true) %> <%= value.to_s %> <% else %> <% v = result.values[key][I18n.locale.to_s][value.to_i-1] rescue nil %><%= v.nil? ? value : v %>