You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iferr:=sess.SQL("SELECT * FROM review WHERE id IN (SELECT max(id) as id FROM review WHERE issue_id = ? AND type in (?, ?) GROUP BY issue_id, reviewer_id) ORDER BY review.updated_unix ASC",
343
+
issueID, ReviewTypeApprove, ReviewTypeReject).
344
+
Find(&reviews); err!=nil {
345
+
returnnil, err
363
346
}
364
347
365
-
// We need to group our results by the fields we want, otherwise some databases will fail (only_full_group_by).
366
-
// But becaus we're doing this, we need to manually filter out multiple reviews of different types by the
367
-
// same person because we only want to show the newest review grouped by user. Thats why we're using a map here.
0 commit comments