From 7e6a0e648a34c2b4b6ec009604eeecec20233aab Mon Sep 17 00:00:00 2001 From: evilhero Date: Thu, 1 Jan 2015 19:33:47 -0500 Subject: [PATCH] FIX: (#910) Upcoming tab would be unaccessible if there were annuals present that just had an IssueID, with no associative ComicName within the annuals table. --- mylar/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mylar/__init__.py b/mylar/__init__.py index addceca4..44c1f766 100755 --- a/mylar/__init__.py +++ b/mylar/__init__.py @@ -1695,9 +1695,10 @@ def dbcheck(): # c.execute('ALTER TABLE importresults ADD COLUMN MetaData TEXT') #let's delete errant comics that are stranded (ie. Comicname = Comic ID: ) - c.execute("DELETE from COMICS WHERE ComicName='None' OR ComicName LIKE 'Comic ID%' OR ComicName is NULL") - c.execute("DELETE from ISSUES WHERE ComicName='None' OR ComicName LIKE 'Comic ID%' OR ComicName is NULL") - c.execute("DELETE from UPCOMING WHERE ComicName='None' OR ComicName is NULL or IssueNumber is NULL") + c.execute("DELETE from comics WHERE ComicName='None' OR ComicName LIKE 'Comic ID%' OR ComicName is NULL") + c.execute("DELETE from issues WHERE ComicName='None' OR ComicName LIKE 'Comic ID%' OR ComicName is NULL") + c.execute("DELETE from annuals WHERE ComicName='None' OR ComicName is NULL or Issue_Number is NULL") + c.execute("DELETE from upcoming WHERE ComicName='None' OR ComicName is NULL or IssueNumber is NULL") logger.info('Ensuring DB integrity - Removing all Erroneous Comics (ie. named None)') logger.info('Correcting Null entries that make the main page break on startup.')