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>2020-10-08 12:08:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-08 12:08:40 +0300
commit33882b0ed118afb7239b76a074f9ab7cf90558f3 (patch)
tree7637ebe087cb94c9d2b59b62af7ccbe45c9f191d /app/presenters/snippet_blob_presenter.rb
parent028d8ac9fdde17782cc002563ecd7c5f77ea699f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters/snippet_blob_presenter.rb')
-rw-r--r--app/presenters/snippet_blob_presenter.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/presenters/snippet_blob_presenter.rb b/app/presenters/snippet_blob_presenter.rb
index 665b3657623..597ef6ebc39 100644
--- a/app/presenters/snippet_blob_presenter.rb
+++ b/app/presenters/snippet_blob_presenter.rb
@@ -48,6 +48,8 @@ class SnippetBlobPresenter < BlobPresenter
end
def snippet_blob_raw_route(only_path: false)
+ return gitlab_raw_snippet_url(snippet, only_path: only_path) unless snippet.repository_exists?
+
gitlab_raw_snippet_blob_url(snippet, blob.path, only_path: only_path)
end
end