summaryrefslogtreecommitdiff
path: root/lib/api/triggers.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-12-10 18:12:19 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2015-12-11 18:02:09 +0100
commit3578153d3e838da92587fed88a608d9a5458c37c (patch)
tree5b7f1b21ef9361e63bb83b3be9973aec492de3af /lib/api/triggers.rb
parent91cdb08d5fa83a86f5f18088bf148e832732bed9 (diff)
downloadgitlab-ce-3578153d3e838da92587fed88a608d9a5458c37c.tar.gz
Fix triggers tests
Diffstat (limited to 'lib/api/triggers.rb')
-rw-r--r--lib/api/triggers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/triggers.rb b/lib/api/triggers.rb
index b713c00e82a..2781f1cf191 100644
--- a/lib/api/triggers.rb
+++ b/lib/api/triggers.rb
@@ -14,7 +14,7 @@ module API
post ":id/trigger/builds" do
required_attributes! [:ref, :token]
- project = Project.find_with_namespace(id) || Project.find_by(id: params[:id])
+ project = Project.find_with_namespace(params[:id]) || Project.find_by(id: params[:id])
trigger = Ci::Trigger.find_by_token(params[:token].to_s)
not_found! unless project && trigger
unauthorized! unless trigger.project == project