Skip to content

Commit

Permalink
[Waste] Make sure location photo stored first.
Browse files Browse the repository at this point in the history
If present; this will then be used in e.g. report logged email.
  • Loading branch information
dracos committed Sep 20, 2023
1 parent 9b91554 commit 8f2186d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion perllib/FixMyStreet/App/Controller/Waste.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1471,7 +1471,8 @@ sub add_report : Private {
# So ignore keys that end with 'fileid'.
# XXX Should fix this so there isn't duplicate data across different keys.
my @bulky_photo_data;
for (grep { /^(item|location)_photo(_\d+)?$/ } keys %$data) {
push @bulky_photo_data, $data->{location_photo} if $data->{location_photo};
for (grep { /^item_photo_\d+$/ } sort keys %$data) {
push @bulky_photo_data, $data->{$_} if $data->{$_};
}
$c->stash->{bulky_photo_data} = \@bulky_photo_data;
Expand Down

0 comments on commit 8f2186d

Please sign in to comment.