CPO - Pull Tokens = Do not get tags when there is nothing to do!
MODIFY
src/client/ocpi/CpoOCPIClient.ts
src/client/ocpi/CpoOCPIClient.ts
@@ -126,9 +126,9 @@ export default class CpoOCPIClient extends OCPIClient {
const tokens = response.data.data as OCPIToken[];
// Get all Tags at once from the DB
const tagIDs = tokens.map((token) => token.uid);
+ if (!Utils.isEmptyArray(tokens)) {
const tags = await TagStorage.getTags(this.tenant,
{ tagIDs: tagIDs }, Constants.DB_PARAMS_MAX_LIMIT);
- if (!Utils.isEmptyArray(tokens)) {
// Check and get eMSP users from Tokens
await this.checkAndCreateEMSPUsersFromTokens(tokens, emspUsersMap);
// Update the tags

CPO - Pull Tokens = Do not get tags when there is nothing to do!