From 2685e6fdea1e6c9fef230a494d3aecb742388a4f Mon Sep 17 00:00:00 2001 From: Bohung Date: Mon, 12 Jul 2021 16:28:38 +0800 Subject: [PATCH] Fix bug. --- app/controllers/admin/archive_files_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/archive_files_controller.rb b/app/controllers/admin/archive_files_controller.rb index c6789cf..86b9ed0 100644 --- a/app/controllers/admin/archive_files_controller.rb +++ b/app/controllers/admin/archive_files_controller.rb @@ -111,7 +111,7 @@ class Admin::ArchiveFilesController < OrbitAdminController tempfile.write(file_content_info["content"].unpack('U*').map{|i| i.chr }.join) v["file"] = ActionDispatch::Http::UploadedFile.new({:filename=>filename,:type=>content_type,:head=>head,:tempfile=>tempfile}) end - end + end rescue nil @archive_file = ArchiveFile.find(params[:id]) @archive_file.update_user_id = current_user.id