Bug Fix: Search fails with unassigned devices

This commit is contained in:
Gary Sharp
2014-04-17 15:47:15 +10:00
parent 5aede7153c
commit b77bdf16f5
@@ -13,7 +13,7 @@ namespace Disco.Models.Services.Searching
public string Id { get; set; }
public string Type { get { return type; } }
public string Description { get { return string.Format("{0} ({1})", this.Id, this.ComputerName); } }
public string ScoreValue { get { return string.Format("{0} {1} {2} {3} {4}", this.Id, this.AssignedUserId.Substring(0, this.AssignedUserId.IndexOf('\\')), this.AssignedUserId, this.AssignedUserDisplayName, this.AssetNumber); } }
public string ScoreValue { get { return string.Format("{0} {1} {2} {3} {4}", this.Id, this.AssignedUserId != null ? this.AssignedUserId.Substring(0, this.AssignedUserId.IndexOf('\\')) : null, this.AssignedUserId, this.AssignedUserDisplayName, this.AssetNumber); } }
public string AssetNumber { get; set; }
public string AssignedUserDescription