Rename attribute and restructure conditions

This commit is contained in:
Maximilian Grundke
2017-11-29 10:39:05 +01:00
parent 1369f9285b
commit 32c274d455
2 changed files with 4 additions and 4 deletions

View File

@ -203,11 +203,11 @@ class SubmissionsController < ApplicationController
end
def extract_errors
if !@message_buffer.blank?
unless @run_output.blank?
@submission.exercise.execution_environment.error_templates.each do |template|
pattern = Regexp.new(template.signature).freeze
if pattern.match(@message_buffer)
StructuredError.create_from_template(template, @message_buffer)
if pattern.match(@run_output)
StructuredError.create_from_template(template, @run_output)
end
end
end