aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/ResultSet/Problem.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-07-20 21:08:58 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-07-20 21:15:17 +0100
commit1d22165ba38a91daa74e52ac67dd75974abdaecb (patch)
treea2559af8d39e7d25bd107763b80d9fdcd61850c2 /perllib/FixMyStreet/DB/ResultSet/Problem.pm
parent5612a350ba12f92d9f2d5dcbafc718b6d68f6e20 (diff)
Add NI sender, for handling cross-council road reports.
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Problem.pm')
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Problem.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
index 00646748d..0e3415448 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
@@ -363,9 +363,10 @@ sub send_reports {
# on a staging server send emails to ourselves rather than the councils
my @testing_councils = split( '\|', mySociety::Config::get('TESTING_COUNCILS') );
unless ( grep { $row->council eq $_ } @testing_councils ) {
- %reporters = (
- 'FixMyStreet::SendReport::Email' => $reporters{ 'FixMyStreet::SendReport::Email' } || FixMyStreet::SendReport::Email->new()
- );
+ %reporters = map { $_ => $reporters{$_} } grep { /FixMyStreet::SendReport::(Email|NI)/ } keys %reporters;
+ unless (%reporters) {
+ %reporters = ( 'FixMyStreet::SendReport::Email' => FixMyStreet::SendReport::Email->new() );
+ }
}
}