Fixed device remove exception.

This commit is contained in:
Ylian Saint-Hilaire 2020-09-09 14:26:03 -07:00
parent 111953771f
commit fc41b7e8b7
2 changed files with 16 additions and 16 deletions

View File

@ -68,7 +68,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
db.Remove('nt' + obj.dbNodeKey); // Remove notes
db.Remove('lc' + obj.dbNodeKey); // Remove last connect time
db.Remove('si' + obj.dbNodeKey); // Remove system information
db.RemoveSMBIOS(obj.dbNodeKey); // Remove SMBios data
if (db.RemoveSMBIOS) { db.RemoveSMBIOS(obj.dbNodeKey); } // Remove SMBios data
db.RemoveAllNodeEvents(obj.dbNodeKey); // Remove all events for this node
db.removeAllPowerEventsForNode(obj.dbNodeKey); // Remove all power events for this node

View File

@ -3424,7 +3424,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
db.Remove('nt' + node._id); // Remove notes
db.Remove('lc' + node._id); // Remove last connect time
db.Remove('si' + node._id); // Remove system information
db.RemoveSMBIOS(node._id); // Remove SMBios data
if (db.RemoveSMBIOS) { db.RemoveSMBIOS(node._id); } // Remove SMBios data
db.RemoveAllNodeEvents(node._id); // Remove all events for this node
db.removeAllPowerEventsForNode(node._id); // Remove all power events for this node
db.Get('ra' + obj.dbNodeKey, function (err, nodes) {