Commit 8b012bad authored by Alan Marchiori's avatar Alan Marchiori

fix null timestamp check in database

parent 3c866e48
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -123,7 +123,7 @@ class DataLogger:
c.execute(sql, (self.dbid,))
rslt = c.fetchone()
if rslt and rslt[0] and rslt[1]:
if rslt and rslt[0] and rslt[1] and rslt[0] != "Null" and rslt[1] != "Null":
self.last_collect["ts"] = rslt[0]
self.last_collect["NextRecNbr"] = rslt[1]
self.log.debug("Datalogger resuming from recnumber {} last uploaded on {}".format(rslt[1], rslt[0]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment