Fix incorrect usage of $Gruntmaster::Data::contest
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 6 Feb 2014 12:38:36 +0000 (14:38 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 6 Feb 2014 12:38:36 +0000 (14:38 +0200)
lib/Gruntmaster/Page/Log/Entry.pm
lib/Gruntmaster/Page/Submit.pm

index af9e1db26ab5250277df264538dfbf96d172cc27..8864df81fb0afcbada3d3aef902f719309e7ffdf 100644 (file)
@@ -26,7 +26,7 @@ HTML
 sub _generate{
        my ($self, $htc, $lang, $env, $ct, $id) = @_;
        debug $env => "language is '$lang', contest is '$ct' and id is '$id'";
-       local $Gruntmaster::Data::contest = $ct;
+       local $Gruntmaster::Data::contest = $ct if $ct;
 
        my @tests = ();
 
index 096af4d81a2e9092a545e73a13b34c7c36b1d730..b08399e005d4f74e0b666aceafcee0e0decb39d1 100644 (file)
@@ -34,7 +34,7 @@ sub generate{
        die if defined $contest && (time > contest_end $contest);
        return reply 'A required parameter was not supplied' if grep { !defined } $problem, $format, $prog;
 
-       local $Gruntmaster::Data::contest = $contest;
+       local $Gruntmaster::Data::contest = $contest if $contest;
 
        my $job = push_job (
                date => time,
This page took 0.010575 seconds and 4 git commands to generate.