@dhyasama/totem-merge 7.0.0 → 7.0.2
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/organizations.js +5 -5
- package/lib/people.js +1 -1
- package/package.json +3 -3
package/lib/organizations.js
CHANGED
|
@@ -81,11 +81,11 @@ var merge = function merge(context, target, source, mergedBy, customerId, cb) {
|
|
|
81
81
|
var updatedTarget = results[5];
|
|
82
82
|
|
|
83
83
|
// result from updateOrganizations within updateReferences
|
|
84
|
-
var updatedReferencesOrgs = results[6][
|
|
84
|
+
var updatedReferencesOrgs = results[6][5];
|
|
85
85
|
|
|
86
86
|
// Check if target had reference(s) updated
|
|
87
87
|
var targetMatch = _.find(updatedReferencesOrgs, function(o) {
|
|
88
|
-
return o.id.toString() === target.id.toString();
|
|
88
|
+
return o && o.id && o.id.toString() === target.id.toString();
|
|
89
89
|
});
|
|
90
90
|
|
|
91
91
|
// Return up to date target
|
|
@@ -211,7 +211,7 @@ var updateCapTables = function updateCapTables(newOrgId, oldOrgId, cb) {
|
|
|
211
211
|
self.CapTable.collection.updateOne({ _id: task.id }, task.update).then(function(result) {
|
|
212
212
|
if (result) { updated.push(result); }
|
|
213
213
|
return callback(null, result);
|
|
214
|
-
}
|
|
214
|
+
}, function(err) { return callback(err, null); });
|
|
215
215
|
}, 8);
|
|
216
216
|
|
|
217
217
|
queue.drain = function() { return cb(null, updated); };
|
|
@@ -290,7 +290,7 @@ var updateFinancials = function updateFinancials(newOrgId, oldOrgId, cb) {
|
|
|
290
290
|
self.Financials.collection.updateOne({ _id: task.id }, task.update).then(function(result) {
|
|
291
291
|
if (result) { updated.push(result); }
|
|
292
292
|
return callback(null, result);
|
|
293
|
-
}
|
|
293
|
+
}, function(err) { return callback(err, null); });
|
|
294
294
|
}, 8);
|
|
295
295
|
|
|
296
296
|
queue.drain = function() { return cb(null, updated); };
|
|
@@ -465,7 +465,7 @@ var updateRounds = function updateRounds(newOrgId, oldOrgId, cb) {
|
|
|
465
465
|
self.Round.collection.updateOne({ _id: task.id }, task.update).then(function(result) {
|
|
466
466
|
if (result) { updated.push(result); }
|
|
467
467
|
return callback(null, result);
|
|
468
|
-
}
|
|
468
|
+
}, function(err) { return callback(err, null); });
|
|
469
469
|
}, 8);
|
|
470
470
|
|
|
471
471
|
queue.drain = function() { return cb(null, updated); };
|
package/lib/people.js
CHANGED
|
@@ -318,7 +318,7 @@ var updateMeetings = function updateMeetings(newPersonId, oldPersonId, user, cb)
|
|
|
318
318
|
self.Meeting.findByIdAndUpdate(task.id, task.update, { upsert: false, new: true }).then(function(result) {
|
|
319
319
|
if (result) { updated.push(result); }
|
|
320
320
|
return callback(null, result);
|
|
321
|
-
}
|
|
321
|
+
}, function(err) { return callback(err, null); });
|
|
322
322
|
}, 8);
|
|
323
323
|
|
|
324
324
|
queue.drain = function() { return cb(null, updated); };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhyasama/totem-merge",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2",
|
|
4
4
|
"description": "Org and person merging package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"author": "Jason Reynolds",
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": ">=
|
|
16
|
+
"node": ">=24 <25"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@dhyasama/totem-logger": "^2.1.0",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"mongoose": "^8.23.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@dhyasama/totem-models": "^
|
|
30
|
+
"@dhyasama/totem-models": "^12.14.0",
|
|
31
31
|
"mocha": "^5.2.0",
|
|
32
32
|
"mocha-mongoose": "^1.1.1",
|
|
33
33
|
"should": "^8.2.2"
|