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
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2019-02-01 19:59:08 +0300
committerGitLab Release Tools Bot <robert+release-tools@gitlab.com>2019-02-05 21:26:55 +0300
commit2771d97bdc33ff1d50a61327107422b6c0513fdc (patch)
tree79229a166bc3fe6d9d91e8f4bb87f22014dbf3c8 /app
parent666d5b7f2196b3b36f3a802d4aaa75b2a0110d61 (diff)
Merge branch 'ee-1979-blobs-at' into 'master'
Fix migration when project repository is missing See merge request gitlab-org/gitlab-ce!24859 (cherry picked from commit c5d431240e09e20c49dd27b9c65a4865f3f79bbd) db35a3ae Fix migration when project repository is missing
Diffstat (limited to 'app')
-rw-r--r--app/models/repository.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index b47238b52f1..e6ab3b484a2 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -525,6 +525,8 @@ class Repository
# items is an Array like: [[oid, path], [oid1, path1]]
def blobs_at(items)
+ return [] unless exists?
+
raw_repository.batch_blobs(items).map { |blob| Blob.decorate(blob, project) }
end