Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-28 03:11:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-28 03:11:00 +0300
commite39b6277eb4f4560af5c541a79d890e8186f130e (patch)
tree748bfcc631f919e622e560250a464a30c7f458b1 /app/models/container_repository.rb
parent1f992463a93d2db88a661dd2a60a1f0a81375f44 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/container_repository.rb')
-rw-r--r--app/models/container_repository.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/container_repository.rb b/app/models/container_repository.rb
index 14520b2da26..c8b8fe5c951 100644
--- a/app/models/container_repository.rb
+++ b/app/models/container_repository.rb
@@ -224,6 +224,13 @@ class ContainerRepository < ApplicationRecord
end
end
+ # Container Repository model and the code that makes API calls
+ # are tied. Sometimes (mainly in Geo) we need to work with Registry
+ # when Container Repository record doesn't even exist.
+ # The ability to create a not-persisted record with a certain "path" parameter
+ # is very useful
+ attr_writer :path
+
def self.exists_by_path?(path)
where(
project: path.repository_project,