Fallback set of visualID in OCPI tag
MODIFY
src/client/ocpi/CpoOCPIClient.ts
src/client/ocpi/CpoOCPIClient.ts
@@ -134,7 +134,7 @@ export default class CpoOCPIClient extends OCPIClient {
} catch (error) {
result.failure++;
result.logs.push(
- `Failed to update Issuer '${token.issuer}' - Token ID '${token.uid}': ${error.message as string}`
+ `Failed to update Issuer '${token.issuer}' - ID '${token.uid}': ${error.message as string}`
);
}
},

MODIFY
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/OCPIUtilsService.ts
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/OCPIUtilsService.ts
@@ -692,13 +692,13 @@ export default class OCPIUtilsService {
ocpiError: OCPIStatusCode.CODE_2001_INVALID_PARAMETER_ERROR
});
}
+ // Do not set the visualID property as this field is not unique from the eMSP side!!!
const tagToSave: Tag = {
id: token.uid,
issuer: false,
userID: emspUser.id,
active: token.valid === true ? true : false,
description: token.visual_number,
- visualID: token.visual_number,
lastChangedOn: token.last_updated,
ocpiToken: token
};

Fallback set of visualID in OCPI tag