Skip to content

Commit

Permalink
Merge pull request #61 from topcoder-platform/develop
Browse files Browse the repository at this point in the history
Fix issue with assigning members to tasks
  • Loading branch information
ThomasKranitsas committed Feb 16, 2021
2 parents 34bf535 + 5fe4aaf commit 8fb7032
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/ResourceService.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ async function init (currentUser, challengeId, resource, isCreated) {

// Prevent from creating more than 1 submitter resources on tasks
if (_.get(challenge, 'task.isTask', false) && isCreated && resource.roleId === config.SUBMITTER_RESOURCE_ROLE_ID) {
const existing = await getResources(currentUser, challengeId, config.SUBMITTER_RESOURCE_ROLE_ID, 1, 1)
const existing = await getResources(currentUser, challengeId, config.SUBMITTER_RESOURCE_ROLE_ID, null, null, 1, 1)
if (_.find(existing.data, r => r.roleId === config.SUBMITTER_RESOURCE_ROLE_ID)) {
throw new errors.ConflictError(`The Task is already assigned`)
}
Expand Down

0 comments on commit 8fb7032

Please sign in to comment.