]> iEval git - gruntmaster-data.git/blobdiff - lib/Gruntmaster/Data.pm
Change count(%cond) to count(\%cond) to fix warning
[gruntmaster-data.git] / lib / Gruntmaster / Data.pm
index e8b5c73b5ed90becf07f8b3e8caa491062862722..59cd64b3cb1536a751d5bed74a106ba6678b7afd 100644 (file)
@@ -15,7 +15,7 @@ __PACKAGE__->load_namespaces;
 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-05 13:11:39
 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dAEmtAexvUaNXLgYz2rNEg
 
-our $VERSION = '5999.000_011';
+our $VERSION = '5999.000_012';
 
 use Lingua::EN::Inflect qw/PL_N/;
 use JSON::MaybeXS qw/decode_json/;
@@ -43,9 +43,9 @@ BEGIN {
 
 sub user_list {
        my $rs = $_[0]->users->search(undef, {columns => USER_PUBLIC_COLUMNS, prefetch => [qw/problem_statuses contest_statuses/]} );
-       [ sort { $b->{solved} <=> $a->{solved} or $b->{attempted} <=> $a->{attempted} }map {
-               my $solved    = $_->problem_statuses->count(solved => 1);
-               my $attempted = $_->problem_statuses->count(solved => 0);
+       [ sort { $b->{solved} <=> $a->{solved} or $b->{attempted} <=> $a->{attempted} } map { ## no critic (ProhibitReverseSort)
+               my $solved    = $_->problem_statuses->count({solved => 1});
+               my $attempted = $_->problem_statuses->count({solved => 0});
                my $contests  = $_->contest_statuses->count;
                +{ $_->get_columns, solved => $solved, attempted => $attempted, contests => $contests }
        } $rs->all ]
This page took 0.024095 seconds and 4 git commands to generate.