From 4f3581b1e5ea96c1a291102e2268020f9b12df38 Mon Sep 17 00:00:00 2001 From: sudoer777 <78781902+sudoer777@users.noreply.github.com> Date: Fri, 26 Nov 2021 16:16:01 -0700 Subject: [PATCH] Fix bug where genders by sport do not report correctly --- database/scores/genders.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/scores/genders.js b/database/scores/genders.js index b59bdb0..17e3ff2 100644 --- a/database/scores/genders.js +++ b/database/scores/genders.js @@ -15,8 +15,8 @@ const FEMALE = new Gender("female"); async function retrieveBySport(sportID) { - const query = `SELECT gender - from scores.divisions + const query = `SELECT DISTINCT(gender) + FROM scores.divisions WHERE sport_id = $1;`; const table = await database.executeQuery(query, [sportID]);