From 2a7423a515181001c7a0f2c8b4f9f19c82aec95d Mon Sep 17 00:00:00 2001 From: Manuel Seelaus Date: Wed, 27 Dec 2017 18:00:02 -0700 Subject: [PATCH] filter out records with None in any field. --- scripts/hist_importer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/hist_importer.py b/scripts/hist_importer.py index 84fada560..526a752e2 100755 --- a/scripts/hist_importer.py +++ b/scripts/hist_importer.py @@ -107,7 +107,7 @@ def clean(history): Args: history: List of records (datetime, url, title) from source database. """ - nulls = [record for record in history if record[0] is None] + nulls = [record for record in history if None in record] for null_datetime in nulls: history.remove(null_datetime) history = [list(record) for record in history]