From cb6adaff6f2edcd17c8707b782edc94a32b82568 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Thu, 5 Feb 2015 16:16:26 +0200 Subject: [PATCH] Make private 1 or 0 instead of 1 or empty string (cherry picked from commit 02ce2ef628e5973f32dd1ff8c94b79ce00293c93) --- lib/Plack/App/Gruntmaster.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 1a0c7ab..f091892 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -240,9 +240,10 @@ sub dispatch_request{ my $source = $prog ? read_file $prog->path : $_{source_code}; unlink $prog->path if $prog; + my $private = (problem->private && !$_{contest}) ? 1 : 0; my $newjob = db->jobs->create({ maybe contest => $_{contest}, - maybe private => problem->private && !$_{contest}, + private => $private, date => time, extension => FORMAT_EXTENSION->{$_{prog_format}}, format => $_{prog_format}, -- 2.39.2