summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-11-25 12:17:23 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2016-11-25 12:17:23 +0000
commit838c1aad68e8c7f81a0b8778f46f0ce4e7c5439d (patch)
treeb8ca9fabfb7e7dfedccb75896bb87ba6e5a57177 /lib/api/projects.rb
parentafe90d529c82566886d1f2513dd6bee4fa73ff94 (diff)
parent81ba3f9177fcfd76f6b3b715c572ce4920398345 (diff)
downloadgitlab-ce-838c1aad68e8c7f81a0b8778f46f0ce4e7c5439d.tar.gz
Merge branch '22373-reduce-queries-in-api-helpers-find_project' into 'master'
Resolve "Reduce queries in API::Helpers#find_project" See merge request !7714
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index ddfde178d30..2ea3c433ae2 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -379,7 +379,7 @@ module API
# POST /projects/:id/fork/:forked_from_id
post ":id/fork/:forked_from_id" do
authenticated_as_admin!
- forked_from_project = find_project(params[:forked_from_id])
+ forked_from_project = find_project!(params[:forked_from_id])
unless forked_from_project.nil?
if user_project.forked_from_project.nil?
user_project.create_forked_project_link(forked_to_project_id: user_project.id, forked_from_project_id: forked_from_project.id)