From 65cfade420c3e0a16a232d1726ec736802c91b04 Mon Sep 17 00:00:00 2001 From: Tom Mortimer-Jones Date: Thu, 7 Aug 2014 17:05:16 +0100 Subject: [PATCH] [99] Remove empty tags produced by munging all non-ascii tags I thought this way of filtering was easier to read than filter(None, tags) --- ckanext/harvest/harvesters/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/harvest/harvesters/base.py b/ckanext/harvest/harvesters/base.py index da2fb1b..791c281 100644 --- a/ckanext/harvest/harvesters/base.py +++ b/ckanext/harvest/harvesters/base.py @@ -153,7 +153,7 @@ class HarvesterBase(SingletonPlugin): if self.config and self.config.get('clean_tags', False): tags = package_dict.get('tags', []) - tags = [munge_tag(t) for t in tags] + tags = [munge_tag(t) for t in tags if munge_tag(t) != ''] tags = list(set(tags)) package_dict['tags'] = tags