aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script/Reports.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/Script/Reports.pm')
-rw-r--r--perllib/FixMyStreet/Script/Reports.pm9
1 files changed, 1 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/Script/Reports.pm b/perllib/FixMyStreet/Script/Reports.pm
index aa46a5c43..7c469f6ac 100644
--- a/perllib/FixMyStreet/Script/Reports.pm
+++ b/perllib/FixMyStreet/Script/Reports.pm
@@ -197,13 +197,12 @@ sub send(;$) {
# Multiply results together, so one success counts as a success.
my $result = -1;
- my @methods;
for my $sender ( keys %reporters ) {
debug_print("sending using " . $sender, $row->id) if $debug_mode;
$sender = $reporters{$sender};
my $res = $sender->send( $row, \%h );
$result *= $res;
- push @methods, $sender if !$res;
+ $row->add_send_method($sender) if !$res;
if ( $sender->unconfirmed_counts) {
foreach my $e (keys %{ $sender->unconfirmed_counts } ) {
foreach my $c (keys %{ $sender->unconfirmed_counts->{$e} }) {
@@ -216,12 +215,6 @@ sub send(;$) {
if FixMyStreet->test_mode && $sender->can('open311_test_req_used');
}
- # Add the send methods now because e.g. Open311
- # send() calls $row->discard_changes
- foreach (@methods) {
- $row->add_send_method($_);
- }
-
unless ($result) {
$row->update( {
whensent => \'current_timestamp',