]> iEval git - gruntmaster-data.git/commitdiff
Include contest_name in us_entry list of contests
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 12 Dec 2014 12:28:21 +0000 (14:28 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 12 Dec 2014 12:28:21 +0000 (14:28 +0200)
lib/Gruntmaster/Data.pm

index 3258c85c32b769b460c769188c4300e0e79d4135..facc186af800afe1ca7822a59699a550db60b410 100644 (file)
@@ -102,7 +102,7 @@ sub user_entry {
        my ($self, $id) = @_;
        my $user = $self->users->find($id, {columns => USER_PUBLIC_COLUMNS, prefetch => [qw/problem_statuses contest_statuses/]});
        my @problems = map { {problem => $_->get_column('problem'), solved => $_->solved} } $user->problem_statuses;
-       my @contests = map { {contest => $_->get_column('contest'), rank => $_->rank, score => $_->score} } $user->contest_statuses;
+       my @contests = map { {contest => $_->contest->id, contest_name => $_->contest->name, rank => $_->rank, score => $_->score} } $user->contest_statuses->search(undef, {prefetch => 'contest'});
        +{ $user->get_columns, problems => \@problems, contests => \@contests }
 }
 
This page took 0.030221 seconds and 4 git commands to generate.