Update device model type on Enrolment
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Disco.BI
|
|||||||
{
|
{
|
||||||
// Check again now that lock is enforced
|
// Check again now that lock is enforced
|
||||||
deviceModel = DeviceModelsSet.FirstOrDefault(dm => dm.Manufacturer == Manufacturer && dm.Model == Model);
|
deviceModel = DeviceModelsSet.FirstOrDefault(dm => dm.Manufacturer == Manufacturer && dm.Model == Model);
|
||||||
|
|
||||||
if (deviceModel == null)
|
if (deviceModel == null)
|
||||||
{
|
{
|
||||||
// Create the Device Model in a different DataContext so we don't have to commit unrelated changes
|
// Create the Device Model in a different DataContext so we don't have to commit unrelated changes
|
||||||
@@ -52,6 +52,11 @@ namespace Disco.BI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (deviceModel.ModelType != ModelType)
|
||||||
|
deviceModel.ModelType = ModelType;
|
||||||
|
}
|
||||||
|
|
||||||
return new Tuple<DeviceModel,bool>(deviceModel, false);
|
return new Tuple<DeviceModel,bool>(deviceModel, false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user