From 0557254bd178be09468f48b28c570efa4ada83b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 30 Jul 2023 19:01:03 +0200 Subject: [PATCH] refactor: cleanup reservation check condition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../ocpp/1.6/OCPP16IncomingRequestService.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts index 87277e88..cc16622a 100644 --- a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts @@ -833,11 +833,9 @@ export class OCPP16IncomingRequestService extends OCPPIncomingRequestService { chargingStation.getConnectorStatus(0)!.status === OCPP16ChargePointStatus.Reserved; if ( (reserved && - !( - chargingStation.getReservationBy('connectorId', transactionConnectorId)?.idTag === idTag - )) || + chargingStation.getReservationBy('connectorId', transactionConnectorId)?.idTag !== idTag) || (reservedOnConnectorZero && - !(chargingStation.getReservationBy('connectorId', 0)?.idTag === idTag)) + chargingStation.getReservationBy('connectorId', 0)?.idTag !== idTag) ) { return OCPP16Constants.OCPP_RESPONSE_REJECTED; } -- 2.34.1