From b2597e87d264a0663235f5f7a6bf6978d5019755 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Thu, 12 Feb 2015 16:40:24 +0200 Subject: [PATCH] Fix previous commit --- lib/Plack/App/Gruntmaster.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 39928bc..3ec4e78 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -244,7 +244,7 @@ sub dispatch_request{ my $source = $prog ? read_file $prog->path : $_{source_code}; unlink $prog->path if $prog; my $private = (problem->private && !$_{contest}) ? 1 : 0; - $private = 1 if contest->is_pending; + $private = 1 if contest && contest->is_pending; my $newjob = db->jobs->create({ maybe contest => $_{contest}, private => $private, -- 2.39.2