Fixed code to ensure tests passed

This commit is contained in:
Finn 2018-03-02 17:33:57 +00:00
parent 5c73aa917d
commit 8aacc32c71
2 changed files with 2 additions and 2 deletions

View file

@ -55,7 +55,7 @@ sub post_category_list {
$data->{essentials}->{$days}->{value} += $value; $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} } ]; $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 ) : () ), ( defined $file ? ( proof_image => $file ) : () ),
purchase_time => $c->format_db_datetime($purchase_time), purchase_time => $c->format_db_datetime($purchase_time),
distance => $distance, distance => $distance,
essential => ( defined $essential ? $essential : undef ), essential => ( defined $essential ? $essential : 0 ),
} }
); );