Status 404 after moving the folder to another project #1106
This commit is contained in:
parent
ecec07b520
commit
427775f299
@ -127,14 +127,6 @@ class DmsfFolder < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
|
||||
def self.find_by_title(project, folder, title)
|
||||
if folder
|
||||
visible.find_by(project_id: project.id, dmsf_folder_id: nil, title: title)
|
||||
else
|
||||
visible.find_by(project_id: project.id, dmsf_folder_id: folder.id, title: title)
|
||||
end
|
||||
end
|
||||
|
||||
def delete(commit)
|
||||
if locked?
|
||||
errors[:base] << l(:error_folder_is_locked)
|
||||
|
||||
@ -212,7 +212,7 @@ class DmsfFolderTest < RedmineDmsf::Test::UnitTest
|
||||
|
||||
def test_copy_to
|
||||
assert @folder1.copy_to(@project2, nil)
|
||||
assert DmsfFolder.find_by_title(@project2, nil, @folder1.title)
|
||||
assert DmsfFolder.find_by(project_id: @project2.id, title: @folder1.title)
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user