From e340417cb98eddc0733c11405485602bf4c85c2e Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Tue, 3 Mar 2015 16:44:05 +0200 Subject: [PATCH] Set contest on problem_list only when contest is running --- lib/Gruntmaster/Data.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Gruntmaster/Data.pm b/lib/Gruntmaster/Data.pm index b4a124c..75548fb 100644 --- a/lib/Gruntmaster/Data.pm +++ b/lib/Gruntmaster/Data.pm @@ -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} ; -- 2.39.2