fix error

This commit is contained in:
chiu 2022-10-15 11:47:52 +08:00
parent 688449f3f0
commit b05fc0f96f
1 changed files with 2 additions and 2 deletions

View File

@ -159,9 +159,9 @@ class Admin::AsksController < OrbitAdminController
ask_setting = AskCategorySetting.where(:category_id=>@category_id, :use_default.ne=>true).first ask_setting = AskCategorySetting.where(:category_id=>@category_id, :use_default.ne=>true).first
if ask_setting.nil? if ask_setting.nil?
ask_setting = AskSetting.first ask_setting = AskSetting.first
tmp = ask_setting.custom_fields.map{|k,v| ["default@#{k}", v]} tmp = ask_setting.custom_fields.map{|k,v| ["default@#{k}", v]}.to_h
else else
tmp = ask_setting.custom_fields.map{|k,v| ["custom@#{k}", v]} tmp = ask_setting.custom_fields.map{|k,v| ["custom@#{k}", v]}.to_h
end end
list_setting_custom_fields = @ask_list_setting.custom_fields list_setting_custom_fields = @ask_list_setting.custom_fields
else else