]> iEval git - gruntmaster-data.git/commitdiff
Exclude pending jobs from standings
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 6 Feb 2015 14:50:52 +0000 (16:50 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 6 Feb 2015 14:50:52 +0000 (16:50 +0200)
lib/Gruntmaster/Data/Result/Contest.pm

index 4ea2f1ae988f189b76d074073c06105b9940ba47..02a50caeb819c86c5891ed7c0ee4b4e72dfeb0fa 100644 (file)
@@ -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;
This page took 0.025871 seconds and 4 git commands to generate.