summaryrefslogtreecommitdiff
path: root/app/views/projects/jobs/index.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/jobs/index.html.haml')
-rw-r--r--app/views/projects/jobs/index.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/jobs/index.html.haml b/app/views/projects/jobs/index.html.haml
index 8604c7d3ea4..82b65844efc 100644
--- a/app/views/projects/jobs/index.html.haml
+++ b/app/views/projects/jobs/index.html.haml
@@ -9,7 +9,7 @@
.nav-controls
- if can?(current_user, :update_build, @project)
- - if @all_builds.running_or_pending.any?
+ - if @all_builds.running_or_pending.limit(1).any?
= link_to 'Cancel running', cancel_all_project_jobs_path(@project),
data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post