diff --git a/scripts/remove-classifier-keywords/script.py b/scripts/remove-classifier-keywords/script.py index af3b685..2a4278f 100644 --- a/scripts/remove-classifier-keywords/script.py +++ b/scripts/remove-classifier-keywords/script.py @@ -18,11 +18,13 @@ def check(record, logger, state): @staticmethod def do(record, logger, state): new_keywords = [ - keyword for keyword in record.get("keywords", []) if keyword.get("source", "") != "classifier" + keyword + for keyword in record.get("keywords", []) + if keyword.get("source", "") != "classifier" ] if new_keywords: record["keywords"] = new_keywords - else: + else: del record["keywords"]