bug: when adding computer offline, computer name should not be required
This commit is contained in:
@@ -80,6 +80,8 @@ namespace Disco.Web.Controllers
|
|||||||
}
|
}
|
||||||
if (string.IsNullOrWhiteSpace(m.Device.DeviceDomainId))
|
if (string.IsNullOrWhiteSpace(m.Device.DeviceDomainId))
|
||||||
m.Device.DeviceDomainId = null;
|
m.Device.DeviceDomainId = null;
|
||||||
|
if (m.Device.DeviceDomainId != null)
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m.Device.DeviceDomainId = ActiveDirectory.ParseDomainAccountId(m.Device.DeviceDomainId);
|
m.Device.DeviceDomainId = ActiveDirectory.ParseDomainAccountId(m.Device.DeviceDomainId);
|
||||||
@@ -88,6 +90,7 @@ namespace Disco.Web.Controllers
|
|||||||
{
|
{
|
||||||
ModelState.AddModelError("Device.DeviceDomainId", ex.Message);
|
ModelState.AddModelError("Device.DeviceDomainId", ex.Message);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user