added DataStore.updateCurrentTask()
This commit is contained in:
parent
855068c43f
commit
af10a21be7
13
DataStore.py
13
DataStore.py
@ -64,3 +64,16 @@ WHERE id = 0
|
|||||||
c.close()
|
c.close()
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
return ct
|
return ct
|
||||||
|
|
||||||
|
def updateCurrentTask(self, ct):
|
||||||
|
c = self.conn.cursor()
|
||||||
|
c.execute('''
|
||||||
|
DELETE FROM history
|
||||||
|
WHERE id = 0
|
||||||
|
''')
|
||||||
|
c.execute('''
|
||||||
|
INSERT INTO history
|
||||||
|
VALUES (0, ?, ?)
|
||||||
|
''', (ct.taskid, ct.dt.strftime(HISTORY_DT_FMT)))
|
||||||
|
c.close()
|
||||||
|
self.conn.commit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user