diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-05-27 13:33:27 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-05-27 13:33:27 +0100 |
commit | 8a03006831b2ad47f1dc1b066aa2af951ff29001 (patch) | |
tree | 164e37206bad0acfbde21aeed09e25a2ef48d80e /bin | |
parent | 7b7e00c16f6d31ff77b9f28e63aac3b608f2bfbb (diff) | |
parent | 901834444846905c85e56528b020bd1a667cb5d2 (diff) |
Merge branch 'he-still-bit-buggy-grr'
Diffstat (limited to 'bin')
-rw-r--r-- | bin/import_categories | 2 | ||||
-rwxr-xr-x | bin/tfl/import_categories | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/bin/import_categories b/bin/import_categories index 490e2187f..744759f1f 100644 --- a/bin/import_categories +++ b/bin/import_categories @@ -81,7 +81,7 @@ sub make_categories { if ($group) { my $groups = $child_cat->groups; - my %groups = map { $_ => 1} @$groups; + my %groups = map { $_ => 1 } grep { $_ } @$groups; $groups{$group} = 1; my @groups = keys %groups; $child_cat->set_extra_metadata(group => \@groups); diff --git a/bin/tfl/import_categories b/bin/tfl/import_categories index bb48ddc4e..d3b99547c 100755 --- a/bin/tfl/import_categories +++ b/bin/tfl/import_categories @@ -65,7 +65,7 @@ for my $group (keys %$groups) { $child_cat->note($child_cat->in_storage ? 'Updated by import_categories' : 'Created by import_categories'); say colored("WARNING", 'red') . " " . $child_cat->category . " already exists" if $child_cat->in_storage and $child_cat->category ne 'Other (TfL)'; my $groups = $child_cat->groups; - my %groups = map { $_ => 1} @$groups; + my %groups = map { $_ => 1 } grep { $_ } @$groups; $groups{$group} = 1; my @groups = keys %groups; $child_cat->extra(undef) if $child_cat->in_storage; |