aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311/PopulateServiceList.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-05-25 18:06:42 +0100
committerStruan Donald <struan@exo.org.uk>2012-05-25 18:06:42 +0100
commit0ff2c1689fafab7ed533b3989075c34f3c1a8779 (patch)
tree3cc3d58f1d084f1f11025aa466e67891d6cabadc /perllib/Open311/PopulateServiceList.pm
parent65820a534a42852d0d9a1819649f48a54b37c22f (diff)
do not put empty arrays into extra field of contacts and ignore them if they are there
Diffstat (limited to 'perllib/Open311/PopulateServiceList.pm')
-rw-r--r--perllib/Open311/PopulateServiceList.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm
index 59148be7b..7b5f4c7fe 100644
--- a/perllib/Open311/PopulateServiceList.pm
+++ b/perllib/Open311/PopulateServiceList.pm
@@ -224,7 +224,11 @@ sub _add_meta_to_contact {
@meta = grep { ! $ignore{ $_->{ code } } } @meta;
}
- $contact->extra( \@meta );
+ if ( @meta ) {
+ $contact->extra( \@meta );
+ } else {
+ $contact->extra( undef );
+ }
$contact->update;
}