diff options
author | Struan Donald <struan@exo.org.uk> | 2011-08-03 17:36:52 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-08-03 17:36:52 +0100 |
commit | ce4d421f65f2f4df0abf07719cc5dc9320ea6ad1 (patch) | |
tree | 63c782fad58cf0b0a30438bd7e7a2ac84be2eb6e | |
parent | fcba996b89491091370286f3b9d1c011fb0670a2 (diff) |
fix bug in service request details parsing
-rwxr-xr-x | bin/open311-populate-service-list | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/open311-populate-service-list b/bin/open311-populate-service-list index f9f183f26..2e65bf4fd 100755 --- a/bin/open311-populate-service-list +++ b/bin/open311-populate-service-list @@ -78,13 +78,15 @@ while ( my $council = $council_list->next ) { # turn the data into something a bit more friendly to use my %meta = (); - foreach my $attribute ( @{ $meta_data->{attribute} } ) { + foreach my $attribute ( @{ $meta_data->{attributes}->{attribute} } ) { $meta{ $attribute->{code} } = $attribute; } $contact->extra( \%meta ); $contact->update; } + + push @found_contacts, $service->{service_code}; print "created contact for service code " . $service->{service_code} . " for council @{[$council->area_id]}\n"; } } |