From 47a4b1a1c0d6d6e073b970fec728f3863765d0d0 Mon Sep 17 00:00:00 2001 From: Anthony Benites <104385099+ec2sw@users.noreply.github.com> Date: Wed, 6 Jul 2022 08:35:44 -0400 Subject: [PATCH] feat: makes unit owner optional --- src/models/units/units.modeltypes.cjs | 1 - src/validations/units.validations.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/models/units/units.modeltypes.cjs b/src/models/units/units.modeltypes.cjs index 0a0105d5..5b9c7c39 100644 --- a/src/models/units/units.modeltypes.cjs +++ b/src/models/units/units.modeltypes.cjs @@ -29,7 +29,6 @@ module.exports = { // Please insert reference to labels table. unitOwner: { type: Sequelize.STRING, - required: true, }, countryJurisdictionOfOwner: { type: Sequelize.STRING, diff --git a/src/validations/units.validations.js b/src/validations/units.validations.js index 5a49a981..161e0451 100644 --- a/src/validations/units.validations.js +++ b/src/validations/units.validations.js @@ -10,7 +10,7 @@ const unitsBaseSchema = { // issuanceId - derived upon unit creation // orgUid - derived upon unit creation projectLocationId: Joi.string().optional(), - unitOwner: Joi.string().required(), + unitOwner: Joi.string(), countryJurisdictionOfOwner: Joi.string() .custom(pickListValidation('countries', 'countryJurisdictionOfOwner')) .required(),