diff --git a/app/controllers/admin/asks_controller.rb b/app/controllers/admin/asks_controller.rb index 50a0543..3b1af7d 100644 --- a/app/controllers/admin/asks_controller.rb +++ b/app/controllers/admin/asks_controller.rb @@ -276,6 +276,9 @@ class Admin::AsksController < OrbitAdminController ask_setting = AskSetting.first ask_setting = AskSetting.create() if ask_setting.nil? end + if temp_params['custom_values'].nil? + temp_params['custom_values'] = {} + end ask_setting.custom_fields.select{|k,v| v['type']=='file' || v['type']=='image'}.each do |k,v| file = temp_params['custom_values'][k] rescue nil if !file.blank?