device receives a timestamp at creation
no new devices are ever without a lastConnection timestamp
This commit is contained in:
parent
0284eb2fa8
commit
38e16f92e8
@ -235,6 +235,7 @@ def generateDeviceFingerprint():
|
|||||||
if not db.session.query(Device).filter(Device.deviceName==fingerprint).first():
|
if not db.session.query(Device).filter(Device.deviceName==fingerprint).first():
|
||||||
# Save as new Device
|
# Save as new Device
|
||||||
device = Device(deviceName=fingerprint, connection=False)
|
device = Device(deviceName=fingerprint, connection=False)
|
||||||
|
device.lastConnection = int(round(time.time()))
|
||||||
db.session.add(device)
|
db.session.add(device)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user