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/DB/Result/Problem.pm | |
parent | 0cbbf0f2e23069deddc9dbfc836bfdf9e4442c54 (diff) |
Deal with possible multiple send_method_useds.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index a222c78cd..0b8bc4de0 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -893,7 +893,7 @@ bodies by some mechanism. Right now that mechanism is Open311. sub updates_sent_to_body { my $self = shift; - return unless $self->send_method_used && $self->send_method_used eq 'Open311'; + return unless $self->send_method_used && $self->send_method_used =~ /Open311/; # Some bodies only send updates *to* FMS, they don't receive updates. my $cobrand = $self->get_cobrand_logged; @@ -922,6 +922,12 @@ sub add_send_method { } } +sub resend { + my $self = shift; + $self->whensent(undef); + $self->send_method_used(undef); +} + sub as_hashref { my ($self, $c, $cols) = @_; |