aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-10-18 13:11:21 +0100
committerStruan Donald <struan@exo.org.uk>2012-10-18 13:11:21 +0100
commit0bbfcbe766cffafc6fa7367edbb62ca274d0fdb9 (patch)
treeb80abb7d6d6fe0afa8410bdf5b86becd328fdc1c /perllib/Open311
parent2a1e02a6a91dd22eaf7807832b9918377d1f4d7d (diff)
handle updates to meta data as well as meta data when a contact is created
Diffstat (limited to 'perllib/Open311')
-rw-r--r--perllib/Open311/PopulateServiceList.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm
index 7b5f4c7fe..833aa4ee5 100644
--- a/perllib/Open311/PopulateServiceList.pm
+++ b/perllib/Open311/PopulateServiceList.pm
@@ -145,6 +145,12 @@ sub _handle_existing_contact {
}
}
+ if ( $contact and lc( $self->_current_service->{metadata} ) eq 'true' ) {
+ $self->_add_meta_to_contact( $contact );
+ } elsif ( $contact and $contact->extra and lc( $self->_current_service->{metadata} ) eq 'false' ) {
+ $contact->update( { extra => undef } );
+ }
+
push @{ $self->found_contacts }, $self->_current_service->{service_code};
}