mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 08:53:59 +01:00
Fixed history not clearing
This commit is contained in:
+5
-2
@@ -417,7 +417,8 @@ class Headphones:
|
|||||||
''' % (snatched[i][5], snatched[i][1], size, snatched[i][4]))
|
''' % (snatched[i][5], snatched[i][1], size, snatched[i][4]))
|
||||||
i += 1
|
i += 1
|
||||||
page.append('''</table></div>''')
|
page.append('''</table></div>''')
|
||||||
#page.append(templates._footer)
|
if len(snatched):
|
||||||
|
page.append(templates._footer)
|
||||||
return page
|
return page
|
||||||
history.exposed = True
|
history.exposed = True
|
||||||
|
|
||||||
@@ -425,7 +426,9 @@ class Headphones:
|
|||||||
conn=sqlite3.connect(database)
|
conn=sqlite3.connect(database)
|
||||||
c=conn.cursor()
|
c=conn.cursor()
|
||||||
logger.log(u"Clearing history")
|
logger.log(u"Clearing history")
|
||||||
c.execute('''DELETE from snatched WHERE Status="Snatched"''')
|
c.execute('''DELETE from snatched''')
|
||||||
|
conn.commit()
|
||||||
|
c.close()
|
||||||
raise cherrypy.HTTPRedirect("/history")
|
raise cherrypy.HTTPRedirect("/history")
|
||||||
clearhistory.exposed = True
|
clearhistory.exposed = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user