fix autoRemoveInactiveDevices again #6268

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2024-07-23 17:28:36 +01:00
parent 92869ec78b
commit 7e504a28e6

4
db.js
View File

@ -136,7 +136,7 @@ module.exports.CreateDB = function (parent, func) {
for (var i in parent.config.domains) {
if (typeof parent.config.domains[i].autoremoveinactivedevices == 'number') {
var v = parent.config.domains[i].autoremoveinactivedevices;
if ((v => 1) && (v <= 2000)) {
if ((v >= 1) && (v <= 2000)) {
if (v < minRemoveInactiveDevice) { minRemoveInactiveDevice = v; }
removeInactiveDevicesPerDomain[i] = v;
minRemoveInactiveDevicesPerDomain[i] = v;
@ -148,7 +148,7 @@ module.exports.CreateDB = function (parent, func) {
for (var i in parent.webserver.meshes) {
if (typeof parent.webserver.meshes[i].expireDevs == 'number') {
var v = parent.webserver.meshes[i].expireDevs;
if ((v => 1) && (v <= 2000)) {
if ((v >= 1) && (v <= 2000)) {
if (v < minRemoveInactiveDevice) { minRemoveInactiveDevice = v; }
if ((minRemoveInactiveDevicesPerDomain[parent.webserver.meshes[i].domain] == null) || (minRemoveInactiveDevicesPerDomain[parent.webserver.meshes[i].domain] > v)) {
minRemoveInactiveDevicesPerDomain[parent.webserver.meshes[i].domain] = v;