diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-12-02 12:37:15 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-12-02 12:37:15 +0000 |
commit | 0cad8ddc97f2f0ec0d130c18bd16c1caae62b4e9 (patch) | |
tree | 9992b496eefe4e645c2884b31bc3f4a1335d0169 | |
parent | 8b03c93d0befaac84a588aa4bb03309d1c1a30c6 (diff) |
Warnfix for missing order in extra fields.
-rw-r--r-- | perllib/Open311/PopulateServiceList.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm index 6fdc4ce3d..7c4337b1a 100644 --- a/perllib/Open311/PopulateServiceList.pm +++ b/perllib/Open311/PopulateServiceList.pm @@ -248,7 +248,7 @@ sub _add_meta_to_contact { # remove trailing colon as we add this when we display so we don't want 2 map { $_->{description} =~ s/:\s*$// if $_->{description}; $_ } # there is a display order and we only want to sort once - sort { $a->{order} <=> $b->{order} } + sort { ($a->{order} || 0) <=> ($b->{order} || 0) } @meta; # Some Open311 endpoints, such as Bromley and Warwickshire send <metadata> |