Edit content returns 409 Conflict
This commit is contained in:
parent
5b4d46cf4a
commit
9dd2d08f78
@ -189,9 +189,12 @@ module RedmineDmsf
|
||||
|
||||
def self.get_project(scope, name, parent_project)
|
||||
prj = nil
|
||||
if parent_project
|
||||
scope = scope.where(parent_id: parent_project.id)
|
||||
end
|
||||
if Setting.plugin_redmine_dmsf['dmsf_webdav_use_project_names']
|
||||
if name =~ /^\[?.+ (\d+)\]?$/
|
||||
prj = scope.find_by(id: $1, parent_id: parent_project&.id)
|
||||
prj = scope.find_by(id: $1)
|
||||
if prj
|
||||
# Check again whether it's really the project and not a folder with a number as a suffix
|
||||
prj = nil unless name.start_with?('[' + DmsfFolder::get_valid_title(prj.name))
|
||||
@ -203,7 +206,7 @@ module RedmineDmsf
|
||||
else
|
||||
identifier = name
|
||||
end
|
||||
prj = scope.find_by(identifier: identifier, parent_id: parent_project&.id)
|
||||
prj = scope.find_by(identifier: identifier)
|
||||
end
|
||||
prj
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user