]> iEval git - plack-app-gruntmaster.git/commitdiff
Add distinct => 1 to problem list
authorMarius Gavrilescu <marius@ieval.ro>
Tue, 25 Mar 2014 08:51:59 +0000 (10:51 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Tue, 25 Mar 2014 11:58:16 +0000 (13:58 +0200)
lib/Gruntmaster/Page/Generic.pm

index 35d89adab97874619da159b1a8a24ea5023a6b43..9e07d4c8a68814aa11189b8a8f5a30e7d9390864 100644 (file)
@@ -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'};
-               $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} };
This page took 0.027346 seconds and 4 git commands to generate.