mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-14 03:52:22 -05:00
Fix for None type in cache
This commit is contained in:
parent
dbe7e019f6
commit
e10a725d27
@ -59,7 +59,7 @@ class CacheDBConnection(db.DBConnection):
|
|||||||
# Delete any entries missing a Indexer ID
|
# Delete any entries missing a Indexer ID
|
||||||
try:
|
try:
|
||||||
sqlResults = self.connection.execute(
|
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:
|
for cur_orphan in sqlResults:
|
||||||
logger.log(u"Missing IndexerID detected! name: " + str(cur_orphan["name"]), logger.DEBUG)
|
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"]))
|
logger.log(u"Deleting orphaned cache entry with name: " + str(cur_orphan["name"]))
|
||||||
@ -244,7 +244,7 @@ class TVCache():
|
|||||||
break
|
break
|
||||||
|
|
||||||
# if we didn't find a Indexer ID return None
|
# 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
|
return None
|
||||||
|
|
||||||
# if the show isn't in out database then return None
|
# if the show isn't in out database then return None
|
||||||
|
Loading…
Reference in New Issue
Block a user