summaryrefslogtreecommitdiff
path: root/lib/gitlab/template
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-05 18:09:15 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-05 18:09:15 +0000
commit6d18e2830d07abf6f3318bd0e11a784bb67dbf52 (patch)
treebcef28df295708ef804447fed5ae5bdb0cca1db0 /lib/gitlab/template
parent2f229658aea96b45edbb28c97a2aa0c58b3433eb (diff)
downloadgitlab-ce-6d18e2830d07abf6f3318bd0e11a784bb67dbf52.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/template')
-rw-r--r--lib/gitlab/template/base_template.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/template/base_template.rb b/lib/gitlab/template/base_template.rb
index dc006877129..31e11f73fe7 100644
--- a/lib/gitlab/template/base_template.rb
+++ b/lib/gitlab/template/base_template.rb
@@ -130,10 +130,10 @@ module Gitlab
return [] if project && !project.repository.exists?
if categories.any?
- categories.keys.map do |category|
+ categories.keys.to_h do |category|
files = self.by_category(category, project)
[category, files.map { |t| { key: t.key, name: t.name, content: t.content } }]
- end.to_h
+ end
else
files = self.all(project)
files.map { |t| { key: t.key, name: t.name, content: t.content } }