aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/import_categories2
-rwxr-xr-xbin/tfl/import_categories2
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;