From e10a725d276c1bb85cf759f5ffb83813919c186b Mon Sep 17 00:00:00 2001 From: echel0n Date: Tue, 29 Apr 2014 07:52:48 -0700 Subject: [PATCH] Fix for None type in cache --- sickbeard/tvcache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sickbeard/tvcache.py b/sickbeard/tvcache.py index 9a0b2c8f..a52b6bbc 100644 --- a/sickbeard/tvcache.py +++ b/sickbeard/tvcache.py @@ -59,7 +59,7 @@ class CacheDBConnection(db.DBConnection): # Delete any entries missing a Indexer ID try: sqlResults = self.connection.execute( - "SELECT * FROM [" + providerName + "] WHERE indexerid is NULL or 0") + "SELECT * FROM [" + providerName + "] WHERE indexerid is NULL or 0 or None") for cur_orphan in sqlResults: logger.log(u"Missing IndexerID detected! name: " + str(cur_orphan["name"]), logger.DEBUG) logger.log(u"Deleting orphaned cache entry with name: " + str(cur_orphan["name"])) @@ -244,7 +244,7 @@ class TVCache(): break # if we didn't find a Indexer ID return None - if indexer_id is None: + if indexer_id is None or indexer_id == None: return None # if the show isn't in out database then return None