1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2025-03-09 05:13:35 +00:00

FIX: when adding story arcs would always return a message indicating arc was already in list,and would not add the arc

This commit is contained in:
evilhero 2015-01-29 20:45:44 -05:00
parent 590d838401
commit ee87963762

View file

@ -342,10 +342,10 @@ class WebInterface(object):
module = '[STORY ARC]'
myDB = db.DBConnection()
#check if it already exists.
arc_chk = myDB.select('SELECT * FROM readinglist WHERE CV_ArcID=?', [arcid])
arc_chk = myDB.selectone('SELECT * FROM readinglist WHERE CV_ArcID=?', [arcid]).fetchone()
if arc_chk is None:
logger.fdebug(module + ' No match in db based on ComicVine ID. Making sure and checking against Story Arc Name.')
arc_chk = myDB.select('SELECT * FROM readinglist WHERE StoryArc=?', [storyarcname])
arc_chk = myDB.selectone('SELECT * FROM readinglist WHERE StoryArc=?', [storyarcname]).fetchone()
if arc_chk is not None:
logger.warn(module + ' ' + storyarcname + ' already exists on your Story Arc Watchlist.')
raise cherrypy.HTTPRedirect("readlist")
@ -1929,13 +1929,15 @@ class WebInterface(object):
manageComics.exposed = True
def manageIssues(self, **kwargs):
print 'here'
print kwargs
#print kwargs
status = kwargs['status']
results = []
myDB = db.DBConnection()
issues = myDB.select('SELECT * from issues WHERE Status=?', [status])
return serve_template(templatename="manageissues.html", title="Manage " + str(status) + " Issues", issues=issues)
for iss in issues:
results.append(iss)
annuals = myDB.select('SELECT * from annuals WHERE Status=?', [status])
return serve_template(templatename="manageissues.html", title="Manage " + str(status) + " Issues", issues=results)
manageIssues.exposed = True
def manageNew(self):