@dhyasama/totem-models 8.107.0 → 8.108.0

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/lib/CapTable.js +4 -4
  2. package/package.json +1 -1
package/lib/CapTable.js CHANGED
@@ -58,7 +58,7 @@ module.exports = function(mongoose, config) {
58
58
  required: false,
59
59
  validate: {
60
60
  validator: function(v) {
61
- if (v && this.lp || this.org || this.person) return false;
61
+ if (v && (this.lp || this.org || this.person)) return false;
62
62
  else return true;
63
63
  },
64
64
  message: 'A stakeholder can only be linked to one of the following: fund, lp, org, person'
@@ -73,7 +73,7 @@ module.exports = function(mongoose, config) {
73
73
  required: false,
74
74
  validate: {
75
75
  validator: function(v) {
76
- if (v || this.fund || this.org || this.person) return false;
76
+ if (v && (this.fund || this.org || this.person)) return false;
77
77
  else return true;
78
78
  },
79
79
  message: 'A stakeholder can only be linked to one of the following: fund, lp, org, person'
@@ -88,7 +88,7 @@ module.exports = function(mongoose, config) {
88
88
  required: false,
89
89
  validate: {
90
90
  validator: function(v) {
91
- if (v || this.fund || this.lp || this.person) return false;
91
+ if (v && (this.fund || this.lp || this.person)) return false;
92
92
  else return true;
93
93
  },
94
94
  message: 'A stakeholder can only be linked to one of the following: fund, lp, org, person'
@@ -103,7 +103,7 @@ module.exports = function(mongoose, config) {
103
103
  required: false,
104
104
  validate: {
105
105
  validator: function(v) {
106
- if (v && this.fund || this.lp || this.org) return false;
106
+ if (v && (this.fund || this.lp || this.org)) return false;
107
107
  else return true;
108
108
  },
109
109
  message: 'A stakeholder can only be linked to one of the following: fund, lp, org, person'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.107.0",
3
+ "version": "8.108.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",