diff options
author | James Lopez <james@jameslopez.es> | 2018-08-30 09:49:24 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-08-30 09:49:24 +0300 |
commit | 14949ba6cbf994af3e39969f6c422e8a0dd33ecd (patch) | |
tree | e1170a2b4c928fa1391c3bdb34a0517d14afdb6c /app/services | |
parent | 151361f49db4d642cb90476e8803ac041b9c3114 (diff) |
fix path bug and update specs
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/projects/transfer_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/projects/transfer_service.rb b/app/services/projects/transfer_service.rb index bf2437aafad..3746cfef702 100644 --- a/app/services/projects/transfer_service.rb +++ b/app/services/projects/transfer_service.rb @@ -43,7 +43,7 @@ module Projects @new_path = File.join(@new_namespace.try(:full_path) || '', project.path) @old_namespace = project.namespace - if Project.where(namespace_id: @new_namespace.try(:id)).where('path = ? or name = ?', project.path, project.path).exists? + if Project.where(namespace_id: @new_namespace.try(:id)).where('path = ? or name = ?', project.path, project.name).exists? raise TransferError.new("Project with same name or path in target namespace already exists") end |