fix export bug

This commit is contained in:
BOHUNG 2020-02-06 14:55:20 +08:00
parent de71f3b4eb
commit 4ca050c2d4
1 changed files with 1 additions and 1 deletions

View File

@ -271,7 +271,7 @@ class Admin::OlympiamanagementsController < OrbitAdminController
@site_locales.insert(0,I18n.locale) @site_locales.insert(0,I18n.locale)
end end
def export_school_connection_data 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/' dir_path = 'tmp/olypiamanagement/'
#FileUtils.rm_r(dir_path, :force => true) if Dir.exist?(dir_path) #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 FileUtils.mkdir dir_path if !Dir.exist?(dir_path) #create dir for storing tmp_file if dir doesn't exist