Simplify code in runner model
This commit is contained in:

committed by
Sebastian Serth

parent
1bf92d8c90
commit
f77e6d9df8
@ -20,7 +20,7 @@ class Runner < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.for(user, exercise)
|
||||
execution_environment = ExecutionEnvironment.find(exercise.execution_environment_id)
|
||||
execution_environment = exercise.execution_environment
|
||||
|
||||
runner = find_by(user: user, execution_environment: execution_environment)
|
||||
if runner.nil?
|
||||
|
Reference in New Issue
Block a user