@dmptool/utils 1.0.12 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/maDMP.js +4 -3
  2. package/package.json +1 -1
package/dist/maDMP.js CHANGED
@@ -228,7 +228,8 @@ async function loadContactFromPlanOwner(rdsConnectionParams, ownerId) {
228
228
  const loadMemberInfo = async (rdsConnectionParams, planId) => {
229
229
  const sql = `
230
230
  SELECT pc.id, a.uri, a.name, pctr.email, pctr.givenName, pctr.surName,
231
- pctr.orcid, pc.isPrimaryContact, GROUP_CONCAT(r.uri) as roles
231
+ pctr.orcid, pc.isPrimaryContact,
232
+ CONCAT('["', GROUP_CONCAT(r.uri SEPARATOR '","'), '"]') as roles
232
233
  FROM planMembers pc
233
234
  LEFT JOIN planMemberRoles pcr ON pc.id = pcr.planMemberId
234
235
  LEFT JOIN memberRoles r ON pcr.memberRoleId = r.id
@@ -573,7 +574,7 @@ const buildDMPToolExtensions = async (rdsConnectionParams, applicationName, doma
573
574
  // Define the Funder's project number if applicable. project_id and funder_id
574
575
  // are used to help tie the project_identifier to the correct
575
576
  // project[?].funding[?] in the RDA Common Standard.
576
- if (funding.funderProjectNumber !== undefined) {
577
+ if (funding.funderProjectNumber) {
577
578
  funderProject = {
578
579
  project_id: projectId,
579
580
  funder_id: funderId,
@@ -588,7 +589,7 @@ const buildDMPToolExtensions = async (rdsConnectionParams, applicationName, doma
588
589
  // Define the Funder's opportunity number if applicable. project_id and
589
590
  // funder_id are used to help tie the opportunity_identifier to the correct
590
591
  // project[?].funding[?] in the RDA Common Standard.
591
- if (funding.funderOpportunityNumber !== undefined) {
592
+ if (funding.funderOpportunityNumber) {
592
593
  funderOpportunity = {
593
594
  project_id: projectId,
594
595
  funder_id: funderId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmptool/utils",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "Helper/Utility functions for use in the DMP Tool services. Particularly AWS tooling and maDMP serialization",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",