Skip to content

Commit

Permalink
fix: principal investigator contributor not checke
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronm-2112 committed Oct 23, 2024
1 parent 270ccab commit 103e301
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/renderer/src/scripts/guided-mode/guided-curate-dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -1934,8 +1934,16 @@ const savePageChanges = async (pageBeingLeftID) => {
throw errorArray;
}

console.log(contributors)
let piContributors = []
// Ensure at least one PI is assigned
const piContributors = contributors.filter((contributor) => contributor["role"] === "PI");
for (const contributor of contributors) {
for (const role of contributor.conRole) {
if (role === "PrincipalInvestigator") {
piContributors.push(contributor);
}
}
}
if (piContributors.length === 0) {
errorArray.push({
type: "notyf",
Expand Down

0 comments on commit 103e301

Please sign in to comment.