Fixed code to ensure tests passed
This commit is contained in:
parent
5c73aa917d
commit
8aacc32c71
2 changed files with 2 additions and 2 deletions
|
@ -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} } ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 ),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Reference in a new issue