@dhyasama/totem-models 5.4.0 → 5.4.1
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/Organization.js +3 -0
- package/package.json +1 -1
package/lib/Organization.js
CHANGED
|
@@ -1541,6 +1541,9 @@ module.exports = function(mongoose, config) {
|
|
|
1541
1541
|
org.entered.by = username;
|
|
1542
1542
|
org.entered.on = new Date();
|
|
1543
1543
|
|
|
1544
|
+
// Clean up missing references
|
|
1545
|
+
org.people = _.reject(org.people, function(item) { return !item.person; });
|
|
1546
|
+
|
|
1544
1547
|
org.save(cb);
|
|
1545
1548
|
|
|
1546
1549
|
};
|