From 1974d858edb862596ac968b90e345d93b3e63a76 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 23 Jul 2019 22:04:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=84=E4=BB=B6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_commons_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 8fab8dad3..8e489df1b 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -1593,7 +1593,7 @@ class HomeworkCommonsController < ApplicationController homework_bank.max_num = homework.homework_detail_group.max_num homework_bank.base_on_project = homework.homework_detail_group.base_on_project end - homework.attachments.each do |attachment| + homework.attachments.where("attachtype != 2 and attachtype is null").each do |attachment| att = attachment.copy att.author_id = homework_bank.user_id att.copy_from = attachment.id