diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-08-29 15:36:47 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-08-29 15:36:48 +0100 |
commit | 5e5358f0dd54bdc1a4676459dee216b4b0081d2d (patch) | |
tree | 625fe20f8d2e02f52a9d0a3cf7c1669bddab2104 /perllib | |
parent | e8e104d411004b1a447197aa2a31abe9311f304e (diff) |
Do not delete other category extras on first match
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index dfaf43ffb..8fadbac88 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -258,14 +258,8 @@ sub by_category_ajax_data : Private { my ($self, $c, $type, $category) = @_; my $generate; - if ( $c->stash->{category_extras}->{$category} && @{ $c->stash->{category_extras}->{$category} } >= 1 ) { - $c->stash->{category_extras} = { $category => $c->stash->{category_extras}->{$category} }; - $generate = 1; - } - if ($c->stash->{unresponsive}->{$category}) { - $generate = 1; - } - if ($c->stash->{report_extra_fields}) { + if (($c->stash->{category_extras}->{$category} && @{ $c->stash->{category_extras}->{$category} } >= 1) or \ + $c->stash->{unresponsive}->{$category} or $c->stash->{report_extra_fields}) { $generate = 1; } |