]> iEval git - gruntmaster-data.git/commitdiff
Fix bugs in user_list and set_passphrase
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 2 Aug 2014 21:20:22 +0000 (00:20 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 2 Aug 2014 21:20:22 +0000 (00:20 +0300)
lib/Gruntmaster/Data.pm
lib/Gruntmaster/Data/Result/User.pm

index 1e268aff8308473da98619446f4c130e2490eaae..5754491737e846ac5d5f4177bea0b9bca9947edd 100644 (file)
@@ -103,9 +103,9 @@ 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, offset => ($args{page} - 1) * JOBS_PER_PAGE});
-       $rs = $rs->search({owner   => $args{owner}})   if $args{owner};
-       $rs = $rs->search({contest => $args{contest}}) if $args{contest};
-       $rs = $rs->search({problem => $args{problem}}) if $args{problem};
+       $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};
        [map {
                my %params = $_->get_columns;
                $params{owner_name}   = $_->owner->name;
index 4385b76554c55b5971a0891b40df28a5112f1264..54e6b52c2527653ddaca9496655f4d8d01533547 100644 (file)
@@ -191,7 +191,7 @@ sub set_passphrase {
                cost => 10,
                passphrase => $pw,
                salt_random => 1,
-       )})->as_rfc2307;
+       )->as_rfc2307});
 }
 
 1;
This page took 0.033787 seconds and 4 git commands to generate.