diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-07-24 10:47:33 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-07-24 10:47:33 +0000 |
commit | 4ad8f12e44b81bb5a07a5365ec0fc5fdba19094e (patch) | |
tree | 73a0d96336fc9f65309ae4d0ab4f447ca0cadfab /app/services/projects/update_service.rb | |
parent | d384b6a04782d90f2728307be7e92d0923fff524 (diff) | |
download | gitlab-ce-4ad8f12e44b81bb5a07a5365ec0fc5fdba19094e.tar.gz |
Fix editing project with container images present
Diffstat (limited to 'app/services/projects/update_service.rb')
-rw-r--r-- | app/services/projects/update_service.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/services/projects/update_service.rb b/app/services/projects/update_service.rb index 30ca95eef7a..d81035e4eba 100644 --- a/app/services/projects/update_service.rb +++ b/app/services/projects/update_service.rb @@ -5,7 +5,7 @@ module Projects return error('New visibility level not allowed!') end - if project.has_container_registry_tags? + if renaming_project_with_container_registry_tags? return error('Cannot rename project because it contains container registry tags!') end @@ -44,6 +44,13 @@ module Projects true end + def renaming_project_with_container_registry_tags? + new_path = params[:path] + + new_path && new_path != project.path && + project.has_container_registry_tags? + end + def changing_default_branch? new_branch = params[:default_branch] |