Added check on consumption in car connector
MODIFY
src/server/ocpp/services/OCPPService.ts
src/server/ocpp/services/OCPPService.ts
@@ -1702,9 +1702,12 @@ export default class OCPPService {
if (Utils.isTenantComponentActive(tenant, TenantComponents.CAR_CONNECTOR) && !Utils.isNullOrUndefined(transaction.car) &&
Utils.getChargingStationCurrentType(chargingStation, null, transaction.connectorId) === CurrentType.AC) {
let currentStateOfCharge = null;
- // If statement not needed anymore with specific connector data in car object --> Coming with Tronity implementation
+ // Reassignment not needed anymore with specific connector data in car object --> Coming with Tronity implementation
if (action === TransactionAction.UPDATE) {
transaction.car.carCatalog = transaction.carCatalog;
+ if (Utils.isNullOrUndefined(consumption)) {
+ return;
+ }
}
const carImplementation = await CarConnectorFactory.getCarConnectorImpl(tenant, null, transaction.car);
if (carImplementation) {

Added check on consumption in car connector