Skip to content

Commit

Permalink
Merge pull request #402 from bcgsc/bugfix/DEVSU-2496-error-when-creat…
Browse files Browse the repository at this point in the history
…ing-variant-text-with-specific-cancer-type

bugfix/DEVSU-2496 error when creating variant-text with specific cancer type
  • Loading branch information
sshugsc authored Nov 13, 2024
2 parents 92948e0 + b999292 commit 3e72a3d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/routes/variantText/variantText.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ router.route('/')
delete req.body.project;
delete req.body.template;

if (typeof req.body.cancerType === 'string') {
req.body.cancerType = [req.body.cancerType];
}

await validateAgainstSchema(createSchema, req.body);
} catch (error) {
const message = `Error while validating variant text create request ${error}`;
Expand Down

0 comments on commit 3e72a3d

Please sign in to comment.