diff options
author | Dave Arter <davea@mysociety.org> | 2019-04-12 16:04:04 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2019-06-04 14:54:29 +0100 |
commit | 6ac6941ab96de883dfc101578444a2d1c76e1545 (patch) | |
tree | fe0fd4d3659412cbd5c6bfeca6b046e3125f3322 /perllib/Open311/GetServiceRequests.pm | |
parent | 383e82be540be35a81c36f3d74400f2457c52454 (diff) |
[Open311] Always mark fetched reports non_public for non_public contacts
This change ensures that a report fetched via Open311 for a non_public category
will always be marked as non_public even if its Open311 XML doesn’t explicitly
include the non_public tag.
Diffstat (limited to 'perllib/Open311/GetServiceRequests.pm')
-rw-r--r-- | perllib/Open311/GetServiceRequests.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/perllib/Open311/GetServiceRequests.pm b/perllib/Open311/GetServiceRequests.pm index 194d8d296..09a51319e 100644 --- a/perllib/Open311/GetServiceRequests.pm +++ b/perllib/Open311/GetServiceRequests.pm @@ -157,6 +157,7 @@ sub create_problems { my $state = $open311->map_state($request->{status}); my $non_public = $request->{non_public} ? 1 : 0; + $non_public ||= $contacts[0] ? $contacts[0]->non_public : 0; my $problem = $self->schema->resultset('Problem')->new( { |