device receives a timestamp at creation

no new devices are ever without a lastConnection timestamp
This commit is contained in:
Raphael Maenle 2020-07-17 10:42:27 +02:00
parent 0284eb2fa8
commit 38e16f92e8

View File

@ -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;