From b21b13641a4508a95b08b190a610b234a1d57380 Mon Sep 17 00:00:00 2001 From: Raymond Mutyaba Date: Tue, 29 Aug 2017 17:19:30 -0700 Subject: [PATCH] With no tracks selected, set groupIds = 0 so no challenges are returned. --- src/shared/utils/challenge-listing/filter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/utils/challenge-listing/filter.js b/src/shared/utils/challenge-listing/filter.js index 8e48d395d1..ec3d52b4c5 100644 --- a/src/shared/utils/challenge-listing/filter.js +++ b/src/shared/utils/challenge-listing/filter.js @@ -302,6 +302,7 @@ export function combine(...filters) { export function mapToBackend(filter) { const res = {}; if (filter.groupIds) res.groupIds = filter.groupIds.join(','); + if (filter.groupIds && filter.tracks !== {}) res.groupIds = '0'; /* NOTE: Right now the frontend challenge filter by tag works different, * it looks for matches in the challenge name OR in the techs / platforms. */