From 9063b18012d3acf67b6729fcf4883c6d389881d5 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Thu, 23 Apr 2015 13:15:31 +0200 Subject: [PATCH] Fix hints to work again. --- app/controllers/submissions_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/submissions_controller.rb b/app/controllers/submissions_controller.rb index cfd5391e..74ef224a 100644 --- a/app/controllers/submissions_controller.rb +++ b/app/controllers/submissions_controller.rb @@ -77,8 +77,8 @@ class SubmissionsController < ApplicationController server_sent_event.write({status: output[:status]}, event: 'status') - if stderr.present? - if hint = Whistleblower.new(execution_environment: @submission.execution_environment).generate_hint(stderr) + unless output[:stderr].nil? + if hint = Whistleblower.new(execution_environment: @submission.execution_environment).generate_hint(output[:stderr]) server_sent_event.write(hint, event: 'hint') else store_error(stderr)