Skip to content

Commit bf3fce5

Browse files
jmgasperrakibansary
authored andcommittedFeb 10, 2023
Filters in the competitive programming section are not giving correct results
#525
1 parent 220e614 commit bf3fce5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/services/ChallengeService.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ async function searchChallenges (currentUser, criteria) {
165165
if (criteria.types) {
166166
for (const t of criteria.types) {
167167
const typeSearchRes = await ChallengeTypeService.searchChallengeTypes({ abbreviation: t })
168-
if (typeSearchRes.total > 0) {
168+
if (typeSearchRes.total > 0 || criteria.types.length === 1) {
169169
includedTypeIds.push(_.get(typeSearchRes, 'result[0].id'))
170170
}
171171
}

0 commit comments

Comments
 (0)
Please sign in to comment.