From c84272d15528bf612dad24af20f657b0063f3402 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 6 Feb 2015 16:50:52 +0200 Subject: [PATCH] Exclude pending jobs from standings --- lib/Gruntmaster/Data/Result/Contest.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2