mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-11 23:13:21 -05:00
if no nodes return nothing for getDeviceDetails #6637
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
d1cb184e9e
commit
e66776c5da
@ -8049,6 +8049,9 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
parent.common.unEscapeAllLinksFieldName(docs);
|
||||
|
||||
var results = [], resultPendingCount = 0;
|
||||
if (docs.length == 0) { // no results return blank array
|
||||
func(docs, type);
|
||||
} else {
|
||||
for (i in docs) {
|
||||
// Check device links, if a link points to an unknown user, remove it.
|
||||
parent.cleanDevice(docs[i]);
|
||||
@ -8086,6 +8089,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
getNodeFunc.nodeid = docs[i]._id;
|
||||
parent.GetNodeWithRights(domain, user, docs[i]._id, getNodeFunc);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// If we are paging, we know what devices the user is look at
|
||||
|
Loading…
Reference in New Issue
Block a user