}
$contests{$_->rawowner}++ for $self->contest_statuses->all;
- [ sort { $b->{solved} <=> $a->{solved} or $b->{attempted} <=> $a->{attempted} } map { ## no critic (ProhibitReverseSort)
- my $id = $_->id;
- +{ $_->get_columns,
- solved => ($solved{$id} // 0),
- attempted => ($attempted{$id} // 0),
- contests => ($contests{$id} // 0) }
- } $rs->all ]
+ [ sort { $b->{solved} <=> $a->{solved} or $b->{attempted} <=> $a->{attempted} } ## no critic (ProhibitReverseSort)
+ grep { $_->{solved} || $_->{attempted} } map {
+ my $id = $_->id;
+ +{ $_->get_columns,
+ solved => ($solved{$id} // 0),
+ attempted => ($attempted{$id} // 0),
+ contests => ($contests{$id} // 0) }
+ } $rs->all ]
}
sub user_entry {