附件迁移文件的修改

This commit is contained in:
cxt 2015-10-20 09:24:50 +08:00
parent 9eeb468079
commit dbbdae1be2
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ class UpdateAttachments < ActiveRecord::Migration
if attachment.container_type == 'Course'
course = attachment.course
if course
if course.is_public == 0 && attachment.attachtype == 1
if course.is_public == 0
attachment.is_public = 0
attachment.save
end