Skip to content

Commit 4bbe7b3

Browse files
committed
Better handling of possible missing 'substituted' property when testing for old supervised data on cs_data_processor module.
1 parent 2d06225 commit 4bbe7b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cs_data_processor/cs_data_processor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* A process that watches for raw data updates from protocols using a MongoDB change stream.
55
* Convert raw values and update realtime values and statuses.
6-
* {json:scada} - Copyright (c) 2020-2021 - Ricardo L. Olsen
6+
* {json:scada} - Copyright (c) 2020-2022 - Ricardo L. Olsen
77
* This file is part of the JSON-SCADA distribution (https://github.com/riclolsen/json-scada).
88
*
99
* This program is free software: you can redistribute it and/or modify
@@ -21,7 +21,7 @@
2121

2222
const APP_NAME = 'CS_DATA_PROCESSOR'
2323
const APP_MSG = '{json:scada} - Change Stream Data Processor'
24-
const VERSION = '0.1.2'
24+
const VERSION = '0.1.3'
2525
const Log = require('./simple-logger')
2626
let ProcessActive = false // for redundancy control
2727
var jsConfigFile = '../../conf/json-scada.json'
@@ -438,7 +438,7 @@ const pipeline = [
438438
$expr: {
439439
$and: [
440440
{ $eq: ['$origin', 'supervised'] },
441-
{ $eq: ['$substituted', false] },
441+
{ $ne: ['$substituted', true] },
442442
{ $eq: ['$invalid', false] },
443443
{
444444
$lt: [

0 commit comments

Comments
 (0)