Fix initial value for "last online" device property.

This commit is contained in:
Jared Goodwin 2019-11-15 17:49:18 -08:00
parent 85145d75ec
commit 295956ad36

View File

@ -41,6 +41,8 @@ namespace Remotely.Server.Data
public bool AddOrUpdateDevice(Device device, out Device updatedDevice)
{
device.LastOnline = DateTime.Now;
var existingDevice = RemotelyContext.Devices.Find(device.ID);
if (existingDevice != null)
{
@ -51,7 +53,6 @@ namespace Remotely.Server.Data
existingDevice.FreeStorage = device.FreeStorage;
existingDevice.Is64Bit = device.Is64Bit;
existingDevice.IsOnline = true;
existingDevice.LastOnline = DateTime.Now;
existingDevice.OSArchitecture = device.OSArchitecture;
existingDevice.OSDescription = device.OSDescription;
existingDevice.Platform = device.Platform;