From ecb3869d21232120be79a873a9c81a1dbc902a9b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 31 Aug 2022 02:29:22 +0200 Subject: [PATCH] Fix two ATG semantic consistencies MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/AutomaticTransactionGenerator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/charging-station/AutomaticTransactionGenerator.ts b/src/charging-station/AutomaticTransactionGenerator.ts index 6145ac10..bf28e55b 100644 --- a/src/charging-station/AutomaticTransactionGenerator.ts +++ b/src/charging-station/AutomaticTransactionGenerator.ts @@ -80,7 +80,7 @@ export default class AutomaticTransactionGenerator { } public startConnector(connectorId: number): void { - if (this.connectorsStatus.has(connectorId) === false) { + if (this.chargingStation.connectors.has(connectorId) === false) { logger.warn(`${this.logPrefix(connectorId)} trying to start on non existing connector`); return; } @@ -91,7 +91,7 @@ export default class AutomaticTransactionGenerator { /* This is intentional */ }); }); - } else { + } else if (this.connectorsStatus.get(connectorId)?.start === true) { logger.warn(`${this.logPrefix(connectorId)} already started on connector`); } } -- 2.34.1