From 7e2039ebc2131f6da26ff5dfc4116961a2519812 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Tue, 19 Oct 2021 00:23:58 +0200 Subject: [PATCH] Fix bug that always showed the default value for CPU limit when editing the limit --- app/views/execution_environments/_form.html.slim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/execution_environments/_form.html.slim b/app/views/execution_environments/_form.html.slim index e5853f90..b2073d6f 100644 --- a/app/views/execution_environments/_form.html.slim +++ b/app/views/execution_environments/_form.html.slim @@ -22,7 +22,7 @@ = f.number_field(:memory_limit, class: 'form-control', min: DockerClient::MINIMUM_MEMORY_LIMIT, value: f.object.memory_limit || DockerClient::DEFAULT_MEMORY_LIMIT) .form-group = f.label(:cpu_limit) - = f.number_field(:cpu_limit, class: 'form-control', min: 1, step: 1, value: ExecutionEnvironment::DEFAULT_CPU_LIMIT) + = f.number_field(:cpu_limit, class: 'form-control', min: 1, step: 1, value: f.object.cpu_limit || ExecutionEnvironment::DEFAULT_CPU_LIMIT) .form-check.mb-3 label.form-check-label = f.check_box(:network_enabled, class: 'form-check-input')