From fdca4ea968567048e8a051bd98220d85f3db4d70 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 28 Sep 2016 16:52:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=B8=8E=E7=8F=AD=E7=BA=A7?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BA=93=E5=AF=BC=E5=85=A5=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E9=87=8D=E5=90=8D=E6=97=B6=E5=AF=BC=E5=85=A5=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 87dc127a0..c13039696 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -3200,6 +3200,7 @@ class UsersController < ApplicationController ori = Attachment.find_by_id(send_id) # 如果该附件已经存课程中,则只更新附件创建时间 mul_container.attachments.each do |att| + @exist = false if att.id == ori.id || (!att.copy_from.nil? && !ori.copy_from.nil? && att.copy_from == ori.copy_from) || att.copy_from == ori.id || att.id == ori.copy_from att.created_on = Time.now att.save