Status 404 after moving the folder to another project #1106

This commit is contained in:
Karel Pičman 2020-04-23 10:35:30 +02:00
parent ecec07b520
commit 427775f299
2 changed files with 1 additions and 9 deletions

View File

@ -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)

View File

@ -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