From 4ca050c2d4afddc3a4d5ffc235377ad94c6027a2 Mon Sep 17 00:00:00 2001 From: BOHUNG Date: Thu, 6 Feb 2020 14:55:20 +0800 Subject: [PATCH] fix export bug --- app/controllers/admin/olympiamanagements_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/olympiamanagements_controller.rb b/app/controllers/admin/olympiamanagements_controller.rb index 46ded43..d98dbfd 100644 --- a/app/controllers/admin/olympiamanagements_controller.rb +++ b/app/controllers/admin/olympiamanagements_controller.rb @@ -271,7 +271,7 @@ class Admin::OlympiamanagementsController < OrbitAdminController @site_locales.insert(0,I18n.locale) end def export_school_connection_data - @OlympiaSchoolDataFields = OlympiaSchoolDataFields.all.asc(:id) + @OlympiaSchoolDataFields = OlympiaSchoolDataFields.where(:sign_up_setting_id=>@sign_up_setting.id).asc(:id) dir_path = 'tmp/olypiamanagement/' #FileUtils.rm_r(dir_path, :force => true) if Dir.exist?(dir_path) FileUtils.mkdir dir_path if !Dir.exist?(dir_path) #create dir for storing tmp_file if dir doesn't exist