diff options
Diffstat (limited to 'perllib/Open311/PopulateServiceList.pm')
-rw-r--r-- | perllib/Open311/PopulateServiceList.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm index e58f51be6..6fdc4ce3d 100644 --- a/perllib/Open311/PopulateServiceList.pm +++ b/perllib/Open311/PopulateServiceList.pm @@ -162,7 +162,7 @@ sub _handle_existing_contact { } elsif ( $contact and $contact->extra and lc($metadata) eq 'false' ) { # check if there are any protected fields that we should not delete my @meta = ( - grep { $_->{protected} } + grep { ($_->{protected} || '') eq 'true' } @{ $contact->get_extra_fields } ); $contact->set_extra_fields(@meta); @@ -233,7 +233,7 @@ sub _add_meta_to_contact { # check if there are any protected fields that we should not overwrite my $protected = { map { $_->{code} => $_ } - grep { $_->{protected} } + grep { ($_->{protected} || '') eq 'true' } @{ $contact->get_extra_fields } }; my @meta = @@ -246,7 +246,7 @@ sub _add_meta_to_contact { # turn the data into something a bit more friendly to use @meta = # remove trailing colon as we add this when we display so we don't want 2 - map { $_->{description} =~ s/:\s*$//; $_ } + map { $_->{description} =~ s/:\s*$// if $_->{description}; $_ } # there is a display order and we only want to sort once sort { $a->{order} <=> $b->{order} } @meta; |