Update device model type on Enrolment

This commit is contained in:
Gary Sharp
2014-09-08 14:53:10 +10:00
parent c846fa053a
commit 3ae99f45bb
+6 -1
View File
@@ -28,7 +28,7 @@ namespace Disco.BI
{
// Check again now that lock is enforced
deviceModel = DeviceModelsSet.FirstOrDefault(dm => dm.Manufacturer == Manufacturer && dm.Model == Model);
if (deviceModel == null)
{
// 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);
}