Bug Fix #62: DeviceDomainId may be null
This commit is contained in:
@@ -499,7 +499,7 @@ namespace Disco.BI.DeviceBI
|
||||
response.DeviceComputerName = adMachineAccount.Name;
|
||||
response.DeviceDomainName = adMachineAccount.Domain.NetBiosName;
|
||||
}
|
||||
else
|
||||
else if (ActiveDirectory.IsValidDomainAccountId(RepoDevice.DeviceDomainId))
|
||||
{
|
||||
string accountUsername;
|
||||
ADDomain accountDomain;
|
||||
@@ -508,6 +508,11 @@ namespace Disco.BI.DeviceBI
|
||||
response.DeviceDomainName = accountDomain == null ? null : accountDomain.NetBiosName;
|
||||
response.DeviceComputerName = accountUsername;
|
||||
}
|
||||
else
|
||||
{
|
||||
response.DeviceDomainName = Request.DeviceDNSDomainName;
|
||||
response.DeviceComputerName = Request.DeviceComputerName;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user