projects
/
gruntmaster-page.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e74d16f
)
Add distinct => 1 to problem list
author
Marius Gavrilescu
<marius@ieval.ro>
Tue, 25 Mar 2014 08:51:59 +0000
(10:51 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Tue, 25 Mar 2014 11:58:16 +0000
(13:58 +0200)
lib/Gruntmaster/Page/Generic.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Gruntmaster/Page/Generic.pm
b/lib/Gruntmaster/Page/Generic.pm
index 35d89adab97874619da159b1a8a24ea5023a6b43..9e07d4c8a68814aa11189b8a8f5a30e7d9390864 100644
(file)
--- a/
lib/Gruntmaster/Page/Generic.pm
+++ b/
lib/Gruntmaster/Page/Generic.pm
@@
-123,7
+123,7
@@
thing {
my $db = db $env;
return $db->problems->search({owner => $env->{'gruntmaster.user'}}) if exists $env->{'gruntmaster.user'};
return $db->problems->search({'contest_problems.contest' => $env->{'gruntmaster.contest'}}, {join => 'contest_problems'}) if exists $env->{'gruntmaster.contest'};
my $db = db $env;
return $db->problems->search({owner => $env->{'gruntmaster.user'}}) if exists $env->{'gruntmaster.user'};
return $db->problems->search({'contest_problems.contest' => $env->{'gruntmaster.contest'}}, {join => 'contest_problems'}) if exists $env->{'gruntmaster.contest'};
- $db->problems->search({-or => ['contest_problems.contest' => undef, 'contest.stop' => {'<=', time}], 'me.private' => 0}, {join => {'contest_problems' => 'contest'}});
+ $db->problems->search({-or => ['contest_problems.contest' => undef, 'contest.stop' => {'<=', time}], 'me.private' => 0}, {join => {'contest_problems' => 'contest'}
, distinct => 1
});
};
sortby { $a->{name} cmp $b->{name}};
group { $_->{level} };
};
sortby { $a->{name} cmp $b->{name}};
group { $_->{level} };
This page took
0.011123 seconds
and
4
git commands to generate.