alsmanager_lib 2.0.104 → 2.0.105

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 +5 -3
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -5090,7 +5090,8 @@ function removeSetInfoSQLite(id_device, id_device_col) {
5090
5090
  var query = "";
5091
5091
  if (id_device > 0 && id_device_col > 0) {
5092
5092
  query = "delete from device_set ";
5093
- query += "where id_maindevice = " + id_device + " or id_relateddevice = " + id_device_col;
5093
+ query += "where (id_maindevice = " + id_device + " and id_relateddevice = " + id_device_col + ") or ";
5094
+ query += "(id_relateddevice = " + id_device + " and id_maindevice = " + id_device_col + ") ";
5094
5095
  }
5095
5096
  return query;
5096
5097
  }
@@ -5099,7 +5100,8 @@ function removeSetInfoMySQL(id_device, id_device_col) {
5099
5100
  var query = "";
5100
5101
  if (id_device > 0 && id_device_col > 0) {
5101
5102
  query = "delete from device_set ";
5102
- query += "where id_maindevice = :id_device or id_relateddevice = :id_device_col";
5103
+ query += "where (id_maindevice = :id_device and id_relateddevice = :id_device_col) or ";
5104
+ query += "(id_relateddevice = :id_device and id_maindevice = :id_device_col) ";
5103
5105
  }
5104
5106
  return query;
5105
5107
  }
@@ -12216,7 +12218,7 @@ function getAltriBeniMySQL(id_type, manifacturer, model, id_site, id_place) {
12216
12218
  }
12217
12219
  if (id_type && id_type != '') {
12218
12220
  where_clause += "id_type = :id_type ";
12219
- if (id_site && id_site > 0) || (id_place && id_place != '') {
12221
+ if ((id_site && id_site > 0) || (id_place && id_place != '')) {
12220
12222
  where_clause += " and ";
12221
12223
  }
12222
12224
  }
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.104",
7
+ "version": "2.0.105",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",