diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-25 12:08:19 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-25 12:08:19 +0000 |
commit | e6baeabaa9651d90b03bb64ffce75a2c3cb89aab (patch) | |
tree | 85f3cbd6e437b17be59505cf3ac4794c1838609e /app/models/snippet.rb | |
parent | 5064bf8c5647d4c4430cbb4d097cf1592416de29 (diff) | |
download | gitlab-ce-e6baeabaa9651d90b03bb64ffce75a2c3cb89aab.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index c7b5d7c8278..edf524190e4 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -293,12 +293,12 @@ class Snippet < ApplicationRecord return if repository_exists? && snippet_repository repository.create_if_not_exists - track_snippet_repository + track_snippet_repository(repository.storage) end - def track_snippet_repository - repository = snippet_repository || build_snippet_repository - repository.update!(shard_name: repository_storage, disk_path: disk_path) + def track_snippet_repository(shard) + snippet_repo = snippet_repository || build_snippet_repository + snippet_repo.update!(shard_name: shard, disk_path: disk_path) end def can_cache_field?(field) |