From 9e6c8acca412b6021af4e31be2594546f1075571 Mon Sep 17 00:00:00 2001 From: John Jenko Date: Tue, 30 Jul 2024 14:48:34 -0400 Subject: [PATCH] B2024-051 Added null checks in the MultiUser.cs file to handle when a user as access to a procedure set that no longer exists. --- PROMS/VEPROMS.CSLA.Library/Extension/MultiUserExt.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/MultiUserExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/MultiUserExt.cs index c1f64bc3..d9072509 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/MultiUserExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/MultiUserExt.cs @@ -1107,7 +1107,7 @@ namespace VEPROMS.CSLA.Library foreach (MembershipInfo mi in this.UserMemberships) { - if (mi.EndDate == string.Empty) + if (mi.EndDate == string.Empty && mi.MyGroup.GroupAssignments != null) //B2024-051 added null check - user assigned to non-existing procedure set { foreach (AssignmentInfo ai in mi.MyGroup.GroupAssignments) { @@ -1129,7 +1129,7 @@ namespace VEPROMS.CSLA.Library foreach (MembershipInfo mi in this.UserMemberships) { - if (mi.EndDate == string.Empty) + if (mi.EndDate == string.Empty && mi.MyGroup.GroupAssignments != null) //B2024-051 added null check - user assigned to non-existing procedure set { Dictionary folders = new Dictionary(); //FolderInfo fi = FolderInfo.Get(dv.MyFolder.FolderID); @@ -1157,7 +1157,7 @@ namespace VEPROMS.CSLA.Library foreach (MembershipInfo mi in this.UserMemberships) { - if (mi.EndDate == string.Empty) + if (mi.EndDate == string.Empty && mi.MyGroup.GroupAssignments != null) //B2024-051 added null check - user assigned to non-existing procedure set { Dictionary folders = new Dictionary(); FolderInfo fi = FolderInfo.Get(dv.MyFolder.FolderID); @@ -1184,7 +1184,7 @@ namespace VEPROMS.CSLA.Library foreach (MembershipInfo mi in this.UserMemberships) { - if (mi.EndDate == string.Empty) + if (mi.EndDate == string.Empty && mi.MyGroup.GroupAssignments != null) //B2024-051 added null check - user assigned to non-existing procedure set { Dictionary folders = new Dictionary(); FolderInfo fi = FolderInfo.Get(dv.MyFolder.FolderID); @@ -1211,7 +1211,7 @@ namespace VEPROMS.CSLA.Library foreach (MembershipInfo mi in this.UserMemberships) { - if (mi.EndDate == string.Empty) + if (mi.EndDate == string.Empty && mi.MyGroup.GroupAssignments != null) //B2024-051 added null check - user assigned to non-existing procedure set { Dictionary folders = new Dictionary(); FolderInfo fi = FolderInfo.Get(dv.MyFolder.FolderID); @@ -1238,7 +1238,7 @@ namespace VEPROMS.CSLA.Library foreach (MembershipInfo mi in this.UserMemberships) { - if (mi.EndDate == string.Empty) + if (mi.EndDate == string.Empty && mi.MyGroup.GroupAssignments != null) //B2024-051 added null check - user assigned to non-existing procedure set { Dictionary folders = new Dictionary(); FolderInfo fi = FolderInfo.Get(dv.MyFolder.FolderID);