Skip to content

Commit 271f4d1

Browse files
committed
TD-5709 Added where clause to limit the results to active admin records
1 parent 15214bf commit 271f4d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ FROM FrameworkCollaborators fc
306306
INNER JOIN AdminAccounts aa3 ON fc.AdminID = aa3.ID
307307
LEFT OUTER JOIN FrameworkReviews AS fwr ON fc.ID = fwr.FrameworkCollaboratorID AND fwr.Archived IS NULL AND fwr.ReviewComplete IS NULL
308308
WHERE fc.FrameworkID = fw.ID AND fc.IsDeleted = 0
309-
AND aa3.UserID = (SELECT aa4.UserID FROM AdminAccounts aa4 WHERE aa4.ID = @adminId)) AS FrameworkReviewID";
309+
AND aa3.UserID = (SELECT aa4.UserID FROM AdminAccounts aa4 WHERE aa4.ID = @adminId)
310+
AND aa3.Active = 1 ORDER BY fwr.ID DESC) AS FrameworkReviewID";
310311

311312
private const string BrandedFrameworkFields =
312313
@",(SELECT BrandName

0 commit comments

Comments
 (0)