From 38e16f92e820696949d407bc174e8f6ab251b58c Mon Sep 17 00:00:00 2001 From: Raphael Maenle Date: Fri, 17 Jul 2020 10:42:27 +0200 Subject: [PATCH] device receives a timestamp at creation no new devices are ever without a lastConnection timestamp --- server/routes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/server/routes.py b/server/routes.py index e25741e..dae831b 100644 --- a/server/routes.py +++ b/server/routes.py @@ -235,6 +235,7 @@ def generateDeviceFingerprint(): if not db.session.query(Device).filter(Device.deviceName==fingerprint).first(): # Save as new Device device = Device(deviceName=fingerprint, connection=False) + device.lastConnection = int(round(time.time())) db.session.add(device) db.session.commit() break;