From 66ab00a6bd6e5b5478842136829ef1829d0189b1 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Tue, 11 Oct 2022 21:08:34 +0200 Subject: [PATCH] Fix association to testrun_execution_environment --- app/models/execution_environment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/execution_environment.rb b/app/models/execution_environment.rb index d4138000..3ca6da6c 100644 --- a/app/models/execution_environment.rb +++ b/app/models/execution_environment.rb @@ -16,7 +16,7 @@ class ExecutionEnvironment < ApplicationRecord has_many :exercises belongs_to :file_type has_many :error_templates - belongs_to :testrun_execution_environment, optional: true, dependent: :destroy + has_many :testrun_execution_environments, dependent: :destroy scope :with_exercises, -> { where('id IN (SELECT execution_environment_id FROM exercises)') }