Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public IEnumerable<Competency> GetResultSupervisorVerifications(int selfAssessme
INNER JOIN DelegateAccounts DA1 ON CA.DelegateUserID = DA1.UserID AND au.CentreID = DA1.CentreID AND DA1.Active=1
WHERE (LAR.Verified IS NULL) 
AND ((LAR.Result IS NOT NULL) OR (LAR.SupportingComments IS NOT NULL)) 
AND (LAR.Requested IS NOT NULL)
AND (LAR.Requested IS NOT NULL) AND (au.CategoryID = 0 OR au.CategoryID IN (select CategoryID from SelfAssessments where ID = @selfAssessmentId))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IN seems unnecessary here. The select statement is always going to return only one record since we have ID = in the WHERE clause, so we should use = rather than IN.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

ORDER BY SupervisorVerificationRequested DESC, C.Name",
(competency, assessmentQuestion) =>
{
Expand Down
Loading