Skip to content

Commit a167238

Browse files
committed
Filters in the competitive programming section are not giving correct results
#525
1 parent fd00780 commit a167238

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/ChallengeService.js

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

0 commit comments

Comments
 (0)