rescue import_controller import_status file not found

This commit is contained in:
manson 2014-09-03 18:57:28 +08:00
parent f4635502ef
commit 3dafcf37bc
1 changed files with 5 additions and 1 deletions

View File

@ -1218,7 +1218,11 @@ class Admin::ImportController < OrbitAdminController
end
def get_settings_from_import_file
YAML::load_file "#{Rails.root.to_s}/public/import_status.yml"
begin
YAML::load_file "#{Rails.root.to_s}/public/import_status.yml"
rescue Exception => e
write_to_file
end
end
def get_user