项目与班级资源库导入资源重名时导入异常
This commit is contained in:
parent
4ea76f4dbc
commit
fdca4ea968
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue