diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-09 09:08:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-09 09:08:14 +0300 |
commit | 97576e3dfdc15b26c0a7832608397edd69167351 (patch) | |
tree | 90d29c6f48f6df6f9b23d6435baa8a903331a17b /app/models/container_repository.rb | |
parent | a27d3c27d8a81a2d2b7300d6099e94a2bfb30123 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/container_repository.rb')
-rw-r--r-- | app/models/container_repository.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/container_repository.rb b/app/models/container_repository.rb index 2d28a81f462..ab895438191 100644 --- a/app/models/container_repository.rb +++ b/app/models/container_repository.rb @@ -153,7 +153,8 @@ class ContainerRepository < ApplicationRecord end def self.create_from_path!(path) - build_from_path(path).tap(&:save!) + safe_find_or_create_by!(project: path.repository_project, + name: path.repository_name) end def self.build_root_repository(project) |