From: Marius Gavrilescu Date: Fri, 6 Feb 2015 14:50:52 +0000 (+0200) Subject: Exclude pending jobs from standings X-Git-Tag: 5999.000_014~79 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=c84272d15528bf612dad24af20f657b0063f3402;p=gruntmaster-data.git Exclude pending jobs from standings --- diff --git a/lib/Gruntmaster/Data/Result/Contest.pm b/lib/Gruntmaster/Data/Result/Contest.pm index 4ea2f1a..02a50ca 100644 --- a/lib/Gruntmaster/Data/Result/Contest.pm +++ b/lib/Gruntmaster/Data/Result/Contest.pm @@ -213,7 +213,7 @@ sub standings { my @problems = map { $_->rawproblem } $self->contest_problems->search({contest => $ct}, {qw/join problem order_by problem.level/}); my (%scores, %tries, %opens); $opens{$_->rawproblem, $_->rawowner} = $_ for $self->opens->search({contest => $ct}); - for my $job ($self->jobs->search({contest => $ct}, {qw/order_by me.id prefetch/ => [qw/problem/]})) { + for my $job ($self->jobs->search({contest => $ct, result => {'!=', undef}}, {qw/order_by me.id prefetch/ => [qw/problem/]})) { my $open = $opens{$job->rawproblem, $job->rawowner}; my $time = $job->date - ($open ? $open->time : $self->start); next if $time < 0;