Skip to content

Commit ffacdd1

Browse files
author
vikasrohit
authored
Fixing query for returning both task and challenges
Seems like `task.isTask : false` is not enough for the cases where task json is null or task.isTask does not exist.
1 parent d66fbfa commit ffacdd1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/services/ChallengeService.js

+1
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ async function searchChallenges (currentUser, criteria) {
369369
mustQuery.push({
370370
bool: {
371371
should: [
372+
{ bool: { must_not: { exists: { field: 'task.isTask' } } } },
372373
{ match_phrase: { 'task.isTask': false } },
373374
{
374375
bool: {

0 commit comments

Comments
 (0)