diff --git a/DataStore.py b/DataStore.py index 84b8e16..75b698d 100644 --- a/DataStore.py +++ b/DataStore.py @@ -64,3 +64,16 @@ WHERE id = 0 c.close() self.conn.commit() 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()