Skip to content

Commit

Permalink
fix global challenge filtering bug on find challenge page (#2534)
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinBeczak authored Feb 6, 2025
1 parent 2645ee4 commit 4a5c7b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/services/Challenge/Challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,7 @@ export const extendedFind = function (criteria, limit = RESULTS_PER_PAGE, admin
queryParams.ca = filters.archived;
}

if (filters.global) {
queryParams.cg = filters.global;
}
queryParams.cg = Boolean(filters.global);

// Keywords/tags can come from both the the query and the filter, so we need to
// combine them into a single keywords array.
Expand Down
4 changes: 1 addition & 3 deletions src/services/Search/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,7 @@ export const generateSearchParametersString = (
if (filters.archived) {
searchParameters[PARAMS_MAP.archived] = filters.archived;
}
if (filters.global) {
searchParameters[PARAMS_MAP.global] = filters.global;
}

if (filters.reviewRequestedBy) {
searchParameters[PARAMS_MAP.reviewRequestedBy] = filters.reviewRequestedBy;
if (invertFields.reviewRequestedBy) {
Expand Down
1 change: 1 addition & 0 deletions src/services/Task/TaskClusters.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export const fetchTaskClusters = function (
// pe: limit to enabled projects
searchParameters.ce = onlyEnabled ? "true" : "false";
searchParameters.pe = onlyEnabled ? "true" : "false";
searchParameters.cg = Boolean(filters.global);

// if we are restricting to onlyEnabled challenges then let's
// not show 'local' challenges either.
Expand Down

0 comments on commit 4a5c7b6

Please sign in to comment.