mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Rolled back the mtype fix.
This commit is contained in:
		
							parent
							
								
									e8fccb984c
								
							
						
					
					
						commit
						93ace89b69
					
				
					 2 changed files with 2 additions and 9 deletions
				
			
		
							
								
								
									
										9
									
								
								db.js
									
										
									
									
									
								
							
							
						
						
									
										9
									
								
								db.js
									
										
									
									
									
								
							| 
						 | 
					@ -101,14 +101,7 @@ module.exports.CreateDB = function (parent, func) {
 | 
				
			||||||
        obj.GetAllType('mesh', function (err, docs) {
 | 
					        obj.GetAllType('mesh', function (err, docs) {
 | 
				
			||||||
            if (err != null) { parent.debug('db', 'ERROR (GetAll mesh): ' + err); }
 | 
					            if (err != null) { parent.debug('db', 'ERROR (GetAll mesh): ' + err); }
 | 
				
			||||||
            var meshlist = [];
 | 
					            var meshlist = [];
 | 
				
			||||||
            if ((err == null) && (docs.length > 0)) {
 | 
					            if ((err == null) && (docs.length > 0)) { for (var i in docs) { meshlist.push(docs[i]._id); } }
 | 
				
			||||||
                for (var i in docs) {
 | 
					 | 
				
			||||||
                    meshlist.push(docs[i]._id);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    // 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); obj.Set(docs[i]); }
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            if ((obj.databaseType == 4) || (obj.databaseType == 5)) {
 | 
					            if ((obj.databaseType == 4) || (obj.databaseType == 5)) {
 | 
				
			||||||
                // MariaDB
 | 
					                // MariaDB
 | 
				
			||||||
                sqlDbQuery('DELETE FROM MeshCentral.Main WHERE (extra LIKE ("mesh/%") AND (extra NOT IN ?)', [meshlist], func);
 | 
					                sqlDbQuery('DELETE FROM MeshCentral.Main WHERE (extra LIKE ("mesh/%") AND (extra NOT IN ?)', [meshlist], func);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  "name": "meshcentral",
 | 
					  "name": "meshcentral",
 | 
				
			||||||
  "version": "0.7.33",
 | 
					  "version": "0.7.34",
 | 
				
			||||||
  "keywords": [
 | 
					  "keywords": [
 | 
				
			||||||
    "Remote Device Management",
 | 
					    "Remote Device Management",
 | 
				
			||||||
    "Remote Device Monitoring",
 | 
					    "Remote Device Monitoring",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue