From bf53bed55e6ce3380675e142d918d9652d7d4f9f Mon Sep 17 00:00:00 2001 From: Mark Lise Date: Thu, 26 Oct 2017 10:21:48 -0700 Subject: [PATCH] MEM-560: Fixing issue with defaulting to 100%. --- .../projects/client/controllers/project.client.controllers.js | 2 +- modules/projects/server/models/project.model.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/projects/client/controllers/project.client.controllers.js b/modules/projects/client/controllers/project.client.controllers.js index d3cd6d20e..12ce0a65e 100755 --- a/modules/projects/client/controllers/project.client.controllers.js +++ b/modules/projects/client/controllers/project.client.controllers.js @@ -223,7 +223,7 @@ function controllerProjectEntry ($scope, $state, $stateParams, $modal, project, // We already added this to the list, error. AlertService.error('The selected organization has been added already.'); } else { - $scope.project.ownershipData.push({organization: data, sharePercent: 1}); + $scope.project.ownershipData.push({organization: data, sharePercent: 100}); } }; diff --git a/modules/projects/server/models/project.model.js b/modules/projects/server/models/project.model.js index a1a085cb2..4f6959cd0 100644 --- a/modules/projects/server/models/project.model.js +++ b/modules/projects/server/models/project.model.js @@ -177,7 +177,7 @@ module.exports = require ('../../../core/server/controllers/core.schema.controll ownershipData :[ { _id : false, - sharePercent : { type: Number, default: 0 }, + sharePercent : { type: Number, default: 100 }, organization : { type:'ObjectId', ref:'Organization', index:true, default:null } }],