diff --git a/Disco.Data/Repository/DiscoDataSeeder.cs b/Disco.Data/Repository/DiscoDataSeeder.cs index e6b3f3bf..40d05f35 100644 --- a/Disco.Data/Repository/DiscoDataSeeder.cs +++ b/Disco.Data/Repository/DiscoDataSeeder.cs @@ -70,6 +70,13 @@ namespace Disco.Data.Repository 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) {