Failure to Update DMSF from 1.5.9 to 2.0.0 during migrate
This commit is contained in:
parent
dda3ae437b
commit
75c253453e
@ -44,12 +44,16 @@ class DmsfFileContainerRollback < ActiveRecord::Migration[4.2]
|
||||
new_folder_ids << parent.id
|
||||
end
|
||||
# Issue folder
|
||||
title = "#{issue.id} - #{DmsfFolder.get_valid_title(issue.subject)}"
|
||||
folder = DmsfFolder.find_by(project_id: issue.project.id, dmsf_folder_id: parent.id, title: title)
|
||||
unless folder
|
||||
folder = DmsfFolder.new
|
||||
folder.project_id = issue.project.id
|
||||
folder.dmsf_folder_id = parent.id
|
||||
folder.title = "#{issue.id} - #{DmsfFolder.get_valid_title(issue.subject)}"
|
||||
folder.user_id = User.anonymous.id
|
||||
folder.save!
|
||||
end
|
||||
new_folder_ids << folder.id
|
||||
# Move the file into the new folder
|
||||
file.dmsf_folder_id = folder.id
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user