File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
DigitalLearningSolutions.Data/DataServices Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -301,12 +301,13 @@ FROM FrameworkCollaborators fc
301301 AND aa3.UserID = (SELECT aa4.UserID FROM AdminAccounts aa4 WHERE aa4.ID = @adminId)) > 0 THEN 1
302302 ELSE 0
303303 END AS UserRole,
304- (SELECT fwr.ID
304+ (SELECT TOP(1) fwr.ID
305305 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
You can’t perform that action at this time.
0 commit comments