diff options
author | Struan Donald <struan@exo.org.uk> | 2018-10-11 11:31:05 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2018-10-11 11:31:05 +0100 |
commit | 5860df042466727335b9742524ffc8cfdcd089e3 (patch) | |
tree | 76ca8cc77527036b9df2eb1dcef1d9b6a5c6430d | |
parent | 266cf994a94689126f98a1987099cab079cb2180 (diff) |
do not reuse original open311 object in fetch comments loop
The //= meant that once `$open311` was populated we reused it each time
which mean we were passing the original config in to each body.
-rw-r--r-- | perllib/Open311/GetServiceRequestUpdates.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm index c6da37790..20212bc95 100644 --- a/perllib/Open311/GetServiceRequestUpdates.pm +++ b/perllib/Open311/GetServiceRequestUpdates.pm @@ -42,12 +42,12 @@ sub fetch { $cobrand->call_hook(open311_config_updates => \%open311_conf) if $cobrand; - $open311 //= Open311->new(%open311_conf); + my $o = $open311 || Open311->new(%open311_conf); $self->suppress_alerts( $body->suppress_alerts ); $self->blank_updates_permitted( $body->blank_updates_permitted ); $self->system_user( $body->comment_user ); - $self->update_comments( $open311, $body ); + $self->update_comments( $o, $body ); } } |