From 1de10923aedb415f33631532c45b3589b1fc9f48 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 12 Dec 2014 17:03:42 +0200 Subject: [PATCH] Fix names returned by standings --- lib/Gruntmaster/Data/Result/Contest.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Gruntmaster/Data/Result/Contest.pm b/lib/Gruntmaster/Data/Result/Contest.pm index 4b1c1f4..77ac716 100644 --- a/lib/Gruntmaster/Data/Result/Contest.pm +++ b/lib/Gruntmaster/Data/Result/Contest.pm @@ -212,7 +212,7 @@ sub standings { $scores{$job->rawowner}{$job->rawproblem} = int ($factor * calc_score ($value, $time, $tries{$job->rawowner}{$job->rawproblem}++, $self->stop - $self->start)); } - my %user_to_name = map { $_ => $_->name } $self->result_source->schema->users->all; + my %user_to_name = map { $_->id => $_->name } $self->result_source->schema->users->all; my @st = sort { $b->{score} <=> $a->{score} or $a->{user} cmp $b->{user} } map { ## no critic (ProhibitReverseSortBlock) my $user = $_; -- 2.39.2