Fix: Device import case-sensitive serial numbers

This commit is contained in:
Gary Sharp
2018-04-19 17:02:38 +10:00
parent 0497e145ea
commit 78dd494304
2 changed files with 4 additions and 4 deletions
@@ -113,7 +113,7 @@ namespace Disco.Services.Devices.Importing
Device existingDevice = null;
if (DeviceSerialNumberImportField.IsDeviceSerialNumberValid(deviceSerialNumber))
existingDevice = cache.Devices.FirstOrDefault(device => device.SerialNumber == deviceSerialNumber);
existingDevice = cache.FindDevice(deviceSerialNumber);
var fields = columns.Select(h =>
{
@@ -23,13 +23,13 @@ namespace Disco.Services.Devices.Importing
{
context = Context;
rawData = RawData;
currentRowIndex = 0;
rowOffset = currentRowIndex = HasHeaderRow ? 2 : 1;
currentRowIndex = -1;
rowOffset = HasHeaderRow ? 2 : 1;
}
public void Reset()
{
currentRowIndex = 0;
currentRowIndex = -1;
currentRow = null;
}