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:
@@ -26,7 +26,7 @@ namespace Disco.Web.Areas.Public.Models.UserHeldDevices
|
||||
ReadyForReturn = this.ReadyForReturn,
|
||||
WaitingForUserAction = this.WaitingForUserAction,
|
||||
DeviceProfileId = this.DeviceProfileId,
|
||||
DeviceAddress = (this.DeviceAddressId.HasValue ? Database.DiscoConfiguration.OrganisationAddresses.GetAddress(this.DeviceAddressId.Value).ShortName : string.Empty)
|
||||
DeviceAddress = (this.DeviceAddressId.HasValue ? Database.DiscoConfiguration.OrganisationAddresses.GetAddress(this.DeviceAddressId.Value)?.ShortName : string.Empty)
|
||||
};
|
||||
var n = DateTime.Now;
|
||||
if (!this.ReadyForReturn && this.EstimatedReturnTime.HasValue && this.EstimatedReturnTime.Value > n)
|
||||
|
||||
Reference in New Issue
Block a user