summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-03-01 11:11:50 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-03-01 11:11:50 +0100
commit85a461e096dae7436993eba73b205fd916249e46 (patch)
tree93cb6541498db2dc0161383fed2bcf08c4ea3c4b /lib/api
parent8c66d739c12beedb89f617faa0aab568eea37705 (diff)
downloadgitlab-ce-85a461e096dae7436993eba73b205fd916249e46.tar.gz
Check if commit exists first in commit status API
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/commit_statuses.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb
index f98fdd4e159..8e74e177ea0 100644
--- a/lib/api/commit_statuses.rb
+++ b/lib/api/commit_statuses.rb
@@ -20,8 +20,8 @@ module API
get ':id/repository/commits/:sha/statuses' do
authorize!(:read_commit_status, user_project)
- ci_commit = user_project.ci_commit(params[:sha])
not_found!('Commit') unless user_project.commit(params[:sha])
+ ci_commit = user_project.ci_commit(params[:sha])
return [] unless ci_commit
statuses = ci_commit.statuses