summaryrefslogtreecommitdiff
path: root/Project-Unite
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-03-21 13:01:55 -0400
committerMichael <[email protected]>2017-03-21 13:01:55 -0400
commit4654aaea6b03424e93c10137b302e4b13f5e44b1 (patch)
tree18abce1e857348fe5c40ce7d1d44efa8c4e4266a /Project-Unite
parent32d02caddf99637f4bdf83ade374a7eb27dc6a47 (diff)
downloadproject-unite-4654aaea6b03424e93c10137b302e4b13f5e44b1.tar.gz
project-unite-4654aaea6b03424e93c10137b302e4b13f5e44b1.tar.bz2
project-unite-4654aaea6b03424e93c10137b302e4b13f5e44b1.zip
ACL profile query bug.
Diffstat (limited to 'Project-Unite')
-rw-r--r--Project-Unite/ACL.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Project-Unite/ACL.cs b/Project-Unite/ACL.cs
index d85c896..aca67a5 100644
--- a/Project-Unite/ACL.cs
+++ b/Project-Unite/ACL.cs
@@ -29,8 +29,8 @@ namespace Project_Unite
{
userRoles.Add(db.Roles.FirstOrDefault(r => r.Id == usrRole.RoleId) as Role);
}
- var userRole = userRoles.OrderByDescending(m => m.Priority).First();
- return hpr.ActionLink(usr.DisplayName, "ViewProfile", "Profiles", new { name = usr.UserName }, new { style = @"color: " + userRole.ColorHex });
+ var userRole = userRoles.OrderByDescending(m => m.Priority).FirstOrDefault();
+ return hpr.ActionLink(usr.DisplayName, "ViewProfile", "Profiles", new { name = usr.UserName }, new { style = userRole == null ? "color:white;" : @"color: " + userRole.ColorHex });
}
}