mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Handle case of empty meshes list for SQL query. Fixes Ylianst#4157
This commit is contained in:
		
							parent
							
								
									726ce8bddd
								
							
						
					
					
						commit
						ee8b0e701e
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		
							
								
								
									
										1
									
								
								db.js
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								db.js
									
										
									
									
									
								
							|  | @ -1370,6 +1370,7 @@ module.exports.CreateDB = function (parent, func) { | |||
|                 if (id && (id != '')) { | ||||
|                     sqlDbQuery('SELECT doc FROM main WHERE id = ? AND type = ? AND domain = ? AND extra IN (?)', [id, type, domain, meshes], function (err, docs) { if (err == null) { for (var i in docs) { delete docs[i].type } } func(err, performTypedRecordDecrypt(docs)); }); | ||||
|                 } else { | ||||
|                     if ((meshes == null) || (meshes.length == 0)) { meshes = ''; } | ||||
|                     if (extrasids == null) { | ||||
|                         sqlDbQuery('SELECT doc FROM main WHERE type = ? AND domain = ? AND extra IN (?)', [type, domain, meshes], function (err, docs) { if (err == null) { for (var i in docs) { delete docs[i].type } } func(err, performTypedRecordDecrypt(docs)); }); | ||||
|                     } else { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue