Bug Fix #36: Repair computer name template error
Corrects existing invalid computer name templates.
This commit is contained in:
@@ -70,6 +70,13 @@ namespace Disco.Data.Repository
|
|||||||
DistributionType = DeviceProfile.DistributionTypes.OneToMany
|
DistributionType = DeviceProfile.DistributionTypes.OneToMany
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Bug Fix - correct invalid Computer Name Templates
|
||||||
|
var invalidProfiles = Database.DeviceProfiles.Where(dp => dp.ComputerNameTemplate == "DeviceProfile.ShortName + ''-'' + SerialNumber");
|
||||||
|
foreach (var p in invalidProfiles)
|
||||||
|
p.ComputerNameTemplate = DeviceProfile.DefaultComputerNameTemplate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static void SeedJobSubTypes(this DiscoDataContext Database)
|
public static void SeedJobSubTypes(this DiscoDataContext Database)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user