Skip to content

Commit a1415bb

Browse files
authored
Merge pull request #1522 from topcoder-platform/release_0.20.5
Release 0.20.5
2 parents 887b387 + 7de2daf commit a1415bb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/actions/challenges.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,6 @@ export function loadChallengesByPage (
140140
if (filterSortBy) {
141141
filters['sortBy'] = filterSortBy
142142
}
143-
if (userId) {
144-
filters['memberId'] = userId
145-
}
146143
if (filterSortOrder) {
147144
filters['sortOrder'] = filterSortOrder
148145
}
@@ -153,6 +150,10 @@ export function loadChallengesByPage (
153150
filters['projectId'] = projectId
154151
} else if (_.isObject(projectId) && projectId.value > 0) {
155152
filters['projectId'] = projectId.value
153+
} else if (userId) {
154+
// Note that we only add the memberId field if *no* project ID is given,
155+
// so that the list of *all challenges shows only those that the member is on
156+
filters['memberId'] = userId
156157
}
157158

158159
if (status === 'all') {

0 commit comments

Comments
 (0)