]> iEval git - gruntmaster-data.git/commitdiff
Set contest on problem_list only when contest is running
authorMarius Gavrilescu <marius@ieval.ro>
Tue, 3 Mar 2015 14:44:05 +0000 (16:44 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Tue, 3 Mar 2015 14:44:05 +0000 (16:44 +0200)
lib/Gruntmaster/Data.pm

index b4a124ce3c4f7e5b168e4d09136d6cd8b3bb4c5c..75548fb18d4995ec63956b9dc029df387973c059 100644 (file)
@@ -83,7 +83,7 @@ sub problem_list {
        $rs = $rs->search({'contest_problems.contest' => $args{contest}}, {join => 'contest_problems'}) if $args{contest};
        $rs = $rs->search({'me.owner' => $args{owner}}) if $args{owner};
        my %params;
-       $params{contest} = $args{contest} if $args{contest};
+       $params{contest} = $args{contest} if $args{contest} && $self->contest($args{contest})->is_running;
        for ($rs->all) {
                $params{$_->level} //= [];
                push @{$params{$_->level}}, {$_->get_columns, owner_name => $_->owner->name} ;
This page took 0.022544 seconds and 4 git commands to generate.