diff options
author | Valery Sizov <valery@gitlab.com> | 2019-07-09 18:59:52 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2019-07-24 17:56:48 +0300 |
commit | 1902d9cc74a1dc2c87fdbb39a6cdbb67092cbb5a (patch) | |
tree | cff3e853e7df4411bc6d8ace1f815a4155f455fd /app/models | |
parent | 642253b7c769bc9e1b0e4b7890698aa4cb6dbde0 (diff) |
Backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14597
This is the first part of Docker Registry replication
for secondary Geo node.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/container_repository.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/container_repository.rb b/app/models/container_repository.rb index 39e12ac2b06..facd81dde80 100644 --- a/app/models/container_repository.rb +++ b/app/models/container_repository.rb @@ -86,4 +86,9 @@ class ContainerRepository < ApplicationRecord def self.build_root_repository(project) self.new(project: project, name: '') end + + def self.find_by_path!(path) + self.find_by!(project: path.repository_project, + name: path.repository_name) + end end |