alsmanager_lib 2.0.82 → 2.0.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/modules.js +8 -4
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -2380,13 +2380,15 @@ function queryDeviceModels() {
2380
2380
  //
2381
2381
  function queryDeviceManifacturesByFilterSQLite(dev_type) {
2382
2382
  var query = "SELECT DISTINCT manifacturer as search_manifacturer from devices ";
2383
- query += "where devices.type = '" + dev_type + "' ";
2383
+ query += "where (d.is_removed is null or d.is_removed = 0) ";
2384
+ query += "and devices.type = '" + dev_type + "' ";
2384
2385
  query += "order by search_manifacturer ";
2385
2386
  return query;
2386
2387
  }
2387
2388
  function queryDeviceManifacturesByFilterMySQL(dev_type) {
2388
2389
  var query = "SELECT DISTINCT manifacturer as search_manifacturer from devices ";
2389
- query += "where devices.type = :dev_type ";
2390
+ query += "where (d.is_removed is null or d.is_removed = 0) ";
2391
+ query += "and devices.type = :dev_type ";
2390
2392
  query += "order by search_manifacturer ";
2391
2393
  return query;
2392
2394
  }
@@ -2410,7 +2412,8 @@ function queryDeviceManifacturesByFilter(db_used, dev_type) {
2410
2412
  //
2411
2413
  function queryDeviceModelsByFilterSQLite(manifacturer, dev_type) {
2412
2414
  var query = "SELECT DISTINCT model from devices ";
2413
- query += "where manifacturer = '" + manifacturer + "' ";
2415
+ query += "where (d.is_removed is null or d.is_removed = 0) ";
2416
+ query += "and manifacturer = '" + manifacturer + "' ";
2414
2417
  if (dev_type && dev_type != '') {
2415
2418
  query += "and type = '" + dev_type + "' ";
2416
2419
  }
@@ -2420,7 +2423,8 @@ function queryDeviceModelsByFilterSQLite(manifacturer, dev_type) {
2420
2423
 
2421
2424
  function queryDeviceModelsByFilterMySQL(manifacturer, dev_type) {
2422
2425
  var query = "SELECT DISTINCT model from devices ";
2423
- query += "where manifacturer = :manifacturer ";
2426
+ query += "where (d.is_removed is null or d.is_removed = 0) ";
2427
+ query += "and manifacturer = :manifacturer ";
2424
2428
  if (dev_type && dev_type != '') {
2425
2429
  query += "and type = :dev_type ";
2426
2430
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  ".": "./lib/modules.js",
5
5
  "./dbconn": "./lib/dbconn.js"
6
6
  },
7
- "version": "2.0.82",
7
+ "version": "2.0.83",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",