This commit is contained in:
BoHung Chiu 2022-02-07 17:28:23 +08:00
parent 163805f8c1
commit 40d4b889fd
1 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ class Admin::CancerpredictsController < OrbitAdminController
@form_to_show.form_show[ num.to_s ][ sub_property ][params[:locale].to_s] = [] @form_to_show.form_show[ num.to_s ][ sub_property ][params[:locale].to_s] = []
end end
end end
if(property["old_num"] != nil && property["old_num"] != num.to_s) if(property["old_num"].present? && property["old_num"] != num.to_s)
other_in_use_locales.each do |locale| other_in_use_locales.each do |locale|
@form_to_show.form_show[ num.to_s ][ sub_property ][locale] = @form_to_show.form_show_was[ property["old_num"] ][ sub_property ][locale] @form_to_show.form_show[ num.to_s ][ sub_property ][locale] = @form_to_show.form_show_was[ property["old_num"] ][ sub_property ][locale]
end end
@ -185,7 +185,7 @@ class Admin::CancerpredictsController < OrbitAdminController
@form_to_show.form_show_in_result[ num.to_s ][ sub_property ][params[:locale].to_s] = [] @form_to_show.form_show_in_result[ num.to_s ][ sub_property ][params[:locale].to_s] = []
end end
end end
if(property["old_num"] != nil && property["old_num"] != num.to_s) if(property["old_num"].present? && property["old_num"] != num.to_s)
other_in_use_locales.each do |locale| other_in_use_locales.each do |locale|
@form_to_show.form_show_in_result[ num.to_s ][ sub_property ][locale] = @form_to_show.form_show_was[ property["old_num"] ][ sub_property ][locale] @form_to_show.form_show_in_result[ num.to_s ][ sub_property ][locale] = @form_to_show.form_show_was[ property["old_num"] ][ sub_property ][locale]
end end