Bug Fix #97 - Removed Organisation Address References
Remove Device Profile references to an address when its removed, and anticipate missing addresses where referenced.
This commit is contained in:
@@ -53,9 +53,7 @@ namespace Disco.Services.Jobs.Noticeboards
|
||||
if (DeviceAddressId.HasValue)
|
||||
{
|
||||
var config = new OrganisationAddressesConfiguration(null);
|
||||
var address = config.GetAddress(DeviceAddressId.Value);
|
||||
if (address != null)
|
||||
return address.ShortName;
|
||||
return config.GetAddress(DeviceAddressId.Value)?.ShortName;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user