summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-05-01 13:22:25 +0400
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-01 13:22:25 +0400
commit7e0325896081152e7dd5033342ee4f1b485a76ea (patch)
tree03e2575d0be15d245731f254276f477111170933
parent36cdd1e7179aedee7af42d100a208fc1c01e6c63 (diff)
downloadgitlab-ce-7e0325896081152e7dd5033342ee4f1b485a76ea.tar.gz
Remove N+1 query from app/views/projects/runners/_runner.html.haml
-rw-r--r--app/views/projects/runners/_runner.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/runners/_runner.html.haml b/app/views/projects/runners/_runner.html.haml
index d2598f3be07..385e2f8d1c2 100644
--- a/app/views/projects/runners/_runner.html.haml
+++ b/app/views/projects/runners/_runner.html.haml
@@ -26,7 +26,7 @@
- else
- runner_project = @project.runner_projects.find_by(runner_id: runner)
= link_to 'Disable for this project', project_runner_project_path(@project, runner_project), data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm'
- - elsif runner.assigned_to_project?
+ - elsif !(runner.is_shared? || runner.group_type?)
= form_for [@project.namespace.becomes(Namespace), @project, @project.runner_projects.new] do |f|
= f.hidden_field :runner_id, value: runner.id
= f.submit 'Enable for this project', class: 'btn btn-sm'