@dhyasama/totem-models 5.1.5 → 5.1.7

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.
package/lib/Deal.js CHANGED
@@ -181,6 +181,8 @@ module.exports = function(mongoose, config) {
181
181
  else if (lastStage != deal.stage) description += 'The deal was updated from ' + lastStage + ' to ' + deal.stage;
182
182
  else description = 'The deal was updated';
183
183
 
184
+ deal.history = deal.history || [];
185
+
184
186
  deal.history.push({
185
187
  timestamp: new Date(),
186
188
  account: user,
@@ -65,7 +65,7 @@ module.exports = function(mongoose, config) {
65
65
  people: [{
66
66
  person: { type: Schema.ObjectId, ref: 'Person', required: true, index: true },
67
67
  title: { type: String, default: null, trim: true },
68
- current: { type: Boolean, default: false, index: true },
68
+ current: { type: Boolean, default: true, index: true },
69
69
  leader: { type: Boolean, default: false, index: true },
70
70
  public: { type: Boolean, default: true },
71
71
  board: { type: String, enum: ['chairman', 'director', 'observer', 'none'], default: 'none', index: true }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "5.1.5",
3
+ "version": "5.1.7",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",