mirror of
https://github.com/KevinMidboe/homeChecker.git
synced 2025-10-29 17:40:26 +00:00
Forgot to change back the adr of UPDATE sql function to be dynamic to content of online, not a static value. Also removed conn.commit for function where only selects, not update or add.
This commit is contained in:
@@ -34,7 +34,6 @@ def getTimes():
|
|||||||
for name, time in c.fetchall():
|
for name, time in c.fetchall():
|
||||||
returnList.append({"name": name, "time": convertTime(time)})
|
returnList.append({"name": name, "time": convertTime(time)})
|
||||||
|
|
||||||
conn.commit()
|
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
return returnList
|
return returnList
|
||||||
@@ -66,7 +65,7 @@ def updateTimes():
|
|||||||
online = list(set(getOnlineClients()) & set(getAddr(c)))
|
online = list(set(getOnlineClients()) & set(getAddr(c)))
|
||||||
|
|
||||||
for adr in online:
|
for adr in online:
|
||||||
c.execute('UPDATE lastonline SET timesince='+ str(curTime) +' WHERE clientadr="cc:29:f5:b8:2d:a2"')
|
c.execute('UPDATE lastonline SET timesince='+ str(curTime) +' WHERE clientadr="'+ adr + '"')
|
||||||
|
|
||||||
conn.commit()
|
conn.commit()
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user