#750 DmsfFile.save requires project_id attribute

This commit is contained in:
Karel Picman 2017-08-22 14:19:05 +02:00
parent 7e793f9af5
commit f7318f4d39

View File

@ -74,6 +74,11 @@ class DmsfFileContainerRollback < ActiveRecord::Migration
if file if file
file.container_id = container_id file.container_id = container_id
file.container_type = 'Issue' file.container_type = 'Issue'
# Inject project into instance of dmsf_file because save method needs it.
class << file
attr_accessor :project_id
end
file.project_id = 0
file.save file.save
end end
end end