Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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 @@ -1110,7 +1110,7 @@ FROM SelfAssessmentCollaborators
}

var adminId = (int?)connection.ExecuteScalar(
@"SELECT AdminID FROM AdminUsers WHERE Email = @userEmail AND Active = 1 AND CentreID = @centreID",
@"SELECT TOP 1 AdminID FROM AdminUsers WHERE Email = @userEmail AND Active = 1 ORDER BY CASE WHEN CentreID = @centreID THEN 0 ELSE 1 END",
new { userEmail, centreID }
);
if (adminId is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ FROM FrameworkCollaborators
}

var adminId = (int?)connection.ExecuteScalar(
@"SELECT AdminID FROM AdminUsers WHERE Email = @userEmail AND Active = 1 AND CentreID = @centreID",
@"SELECT TOP 1 AdminID FROM AdminUsers WHERE Email = @userEmail AND Active = 1 ORDER BY CASE WHEN CentreID = @centreID THEN 0 ELSE 1 END",
new { userEmail, centreID }
);
if (adminId is null)
Expand Down
Loading