From 72e4026d6c9b241cfaffdc164c6e94d023d1aba3 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Wed, 7 Jul 2021 20:05:20 +0200 Subject: [PATCH] Ensure that the current docker image is listed when editing an execution environment --- app/controllers/execution_environments_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/execution_environments_controller.rb b/app/controllers/execution_environments_controller.rb index 3576ee99..4449fa41 100644 --- a/app/controllers/execution_environments_controller.rb +++ b/app/controllers/execution_environments_controller.rb @@ -22,7 +22,10 @@ class ExecutionEnvironmentsController < ApplicationController destroy_and_respond(object: @execution_environment) end - def edit; end + def edit + # Add the current execution_environment if not already present in the list + @docker_images |= [@execution_environment.docker_image] + end def execute_command @docker_client = DockerClient.new(execution_environment: @execution_environment)