Fixed code to ensure tests passed

This commit is contained in:
Finn 2018-03-02 17:33:57 +00:00
parent 23185985b8
commit 712959c37e
2 changed files with 2 additions and 2 deletions

View file

@ -55,7 +55,7 @@ sub post_category_list {
$data->{essentials}->{$days}->{value} += $value;
}
for my $day ( keys $data->{categories} ) {
for my $day ( keys %{ $data->{categories} } ) {
$data->{categories}->{$day} = [ sort { $b->{value} <=> $a->{value} } @{ $data->{categories}->{$day} } ];
}

View file

@ -196,7 +196,7 @@ sub post_upload {
( defined $file ? ( proof_image => $file ) : () ),
purchase_time => $c->format_db_datetime($purchase_time),
distance => $distance,
essential => ( defined $essential ? $essential : undef ),
essential => ( defined $essential ? $essential : 0 ),
}
);