Fixed car connector carcatalog in transaction update
MODIFY
src/integration/car-connector/CarConnectorFactory.ts
src/integration/car-connector/CarConnectorFactory.ts
@@ -16,7 +16,7 @@ export default class CarConnectorFactory {
if (settings?.carConnector?.connections) {
// Find connection
// Vehicle make will be replaced with specific car information in the car object --> coming with Tronity
- const foundConnection = settings.carConnector.connections.find((connection) => connection.type === connectorId ?? car.carCatalog.vehicleMake.toLowerCase());
+ const foundConnection = settings.carConnector.connections.find((connection) => connection.type === (connectorId ?? car?.carCatalog?.vehicleMake?.toLowerCase()));
if (foundConnection) {
let carConnectorIntegrationImpl: CarConnectorIntegration<CarConnectorSetting> = null;
switch (foundConnection.type) {

MODIFY
src/server/ocpp/services/OCPPService.ts
src/server/ocpp/services/OCPPService.ts
@@ -1702,6 +1702,10 @@ 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
+ if (action === TransactionAction.UPDATE) {
+ transaction.car.carCatalog = transaction.carCatalog;
+ }
const carImplementation = await CarConnectorFactory.getCarConnectorImpl(tenant, null, transaction.car);
if (carImplementation) {
try {

Fixed car connector carcatalog in transaction update