diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-11-02 17:14:58 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-11-06 11:52:07 +0000 |
commit | a4524f33c78674e4ab5f920f38353a3feff6b6e1 (patch) | |
tree | 708cdd5220a9c12d013f70c623139e56be9c88b9 /perllib/FixMyStreet/App/Controller/Admin.pm | |
parent | 0cbbf0f2e23069deddc9dbfc836bfdf9e4442c54 (diff) |
Deal with possible multiple send_method_useds.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 8aac408e4..3bf4f911c 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -905,7 +905,7 @@ sub report_edit : Path('report_edit') : Args(1) { if ( $c->get_param('resend') ) { $c->forward('/auth/check_csrf_token'); - $problem->whensent(undef); + $problem->resend; $problem->update(); $c->stash->{status_message} = '<p><em>' . _('That problem will now be resent.') . '</em></p>'; @@ -1023,7 +1023,7 @@ sub report_edit_category : Private { # If the report has changed bodies (and not to a subset!) we need to resend it my %old_map = map { $_ => 1 } @{$problem->bodies_str_ids}; if (grep !$old_map{$_}, @new_body_ids) { - $problem->whensent(undef); + $problem->resend; } # If the send methods of the old/new contacts differ we need to resend the report my @new_send_methods = uniq map { @@ -1034,7 +1034,7 @@ sub report_edit_category : Private { } @contacts; my %old_send_methods = map { $_ => 1 } split /,/, ($problem->send_method_used || "Email"); if (grep !$old_send_methods{$_}, @new_send_methods) { - $problem->whensent(undef); + $problem->resend; } $problem->bodies_str(join( ',', @new_body_ids )); |