From b7b2d9dcf1d5d6992683287ad79bbcef606e4e13 Mon Sep 17 00:00:00 2001 From: Kai Zhou Date: Mon, 6 Apr 2015 16:16:47 -0600 Subject: [PATCH] fix bug in duplicates in doc_id == 0 when use "if id:", we cannot remove duplicate for doc_id ==0 --- lsh/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsh/__init__.py b/lsh/__init__.py index 7403f25..35cea77 100644 --- a/lsh/__init__.py +++ b/lsh/__init__.py @@ -129,7 +129,7 @@ def _insert_lsh(self,lsh,doc_id,date_added): def prepare_dup_buckets(cls, buckets, id=None): # logging.debug('buckets: %s', buckets) all = list(set(reduce(list.__add__, buckets, []))) - if id: + if id != None: all.remove(id) return all