For API compatibility still generate path from name if only name provided
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
d0b1bc222e
commit
fb7be3238d
1 changed files with 8 additions and 1 deletions
|
@ -13,8 +13,15 @@ module Projects
|
|||
end
|
||||
|
||||
# Set project name from path
|
||||
unless @project.name.present?
|
||||
if @project.name.present? && @project.path.present?
|
||||
# if both name and path set - everything is ok
|
||||
elsif @project.path.present?
|
||||
# Set project name from path
|
||||
@project.name = @project.path.dup
|
||||
elsif @project.name.present?
|
||||
# For compatibility - set path from name
|
||||
# TODO: remove this in 8.0
|
||||
@project.path = @project.name.dup.parameterize
|
||||
end
|
||||
|
||||
# get namespace id
|
||||
|
|
Loading…
Reference in a new issue