]> iEval git - gruntmaster-page.git/commitdiff
Make private 1 or 0 instead of 1 or empty string
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 5 Feb 2015 14:16:26 +0000 (16:16 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 5 Feb 2015 14:16:26 +0000 (16:16 +0200)
lib/Plack/App/Gruntmaster.pm

index 0edfe5abd99615f54778a703cef7b8ee354663ce..bd11fe04e33c429dd3ef7ed8cc7342ddd5cead95 100644 (file)
@@ -238,9 +238,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},
This page took 0.024605 seconds and 4 git commands to generate.