projects
/
gruntmaster-data.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e6a01c9
)
Exclude pending jobs from standings
author
Marius Gavrilescu
<marius@ieval.ro>
Fri, 6 Feb 2015 14:50:52 +0000
(16:50 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Fri, 6 Feb 2015 14:50:52 +0000
(16:50 +0200)
lib/Gruntmaster/Data/Result/Contest.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Gruntmaster/Data/Result/Contest.pm
b/lib/Gruntmaster/Data/Result/Contest.pm
index 4ea2f1ae988f189b76d074073c06105b9940ba47..02a50caeb819c86c5891ed7c0ee4b4e72dfeb0fa 100644
(file)
--- 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});
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;
my $open = $opens{$job->rawproblem, $job->rawowner};
my $time = $job->date - ($open ? $open->time : $self->start);
next if $time < 0;
This page took
0.014151 seconds
and
4
git commands to generate.