mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fix for #2663. Invitation codes are removed for deleted device groups.
This commit is contained in:
parent
76fde352f6
commit
29e30504f0
3 changed files with 8 additions and 2 deletions
3
db.js
3
db.js
|
@ -201,6 +201,9 @@ module.exports.CreateDB = function (parent, func) {
|
|||
// Make sure all mesh types are number type, if not, fix it.
|
||||
if (typeof docs[i].mtype == 'string') { docs[i].mtype = parseInt(docs[i].mtype); meshChange = true; }
|
||||
|
||||
// If the device group is deleted, remove any invite codes
|
||||
if (docs[i].deleted && docs[i].invite) { delete docs[i].invite; meshChange = true; }
|
||||
|
||||
// Take a look at the links
|
||||
if (docs[i].links != null) {
|
||||
for (var j in docs[i].links) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue