]> iEval git - gruntmaster-data.git/commitdiff
Make job_list only return public jobs
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 20 Dec 2014 14:41:07 +0000 (16:41 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 20 Dec 2014 14:41:07 +0000 (16:41 +0200)
lib/Gruntmaster/Data.pm

index e514970820e95cf2037c49806b0f7b23b13dd33e..6de2fa2584338ec45aafef89365323b83d890b12 100644 (file)
@@ -127,7 +127,7 @@ sub contest_entry {
 sub job_list {
        my ($self, %args) = @_;
        $args{page} //= 1;
-       my $rs = $self->jobs->search(undef, {order_by => {-desc => 'me.id'}, prefetch => ['problem', 'owner'], rows => JOBS_PER_PAGE, page => $args{page}});
+       my $rs = $self->jobs->search({private => 0}, {order_by => {-desc => 'me.id'}, prefetch => ['problem', 'owner'], rows => JOBS_PER_PAGE, page => $args{page}});
        $rs = $rs->search({'me.owner' => $args{owner}})   if $args{owner};
        $rs = $rs->search({contest    => $args{contest}}) if $args{contest};
        $rs = $rs->search({problem    => $args{problem}}) if $args{problem};
This page took 0.018846 seconds and 4 git commands to generate.