message: deactivate ocpi before deleting the tag
diff: @@ -157,22 +157,6 @@ export default class TagService {
  action: action
  });
  }
  - // Delete the Tag
  - await TagStorage.deleteTag(req.user.tenantID, tag.id);
  - // Check if default deleted?
  - if (tag.default) {
  - // Clear all default
  - await TagStorage.clearDefaultUserTag(req.user.tenantID, tag.userID);
  - // Make the next active Tag the new default one
  - const firstActiveTag = await TagStorage.getFirstActiveUserTag(req.user.tenantID, tag.userID, {
  - issuer: true,
  - });
  - if (firstActiveTag) {
  - // Set default
  - firstActiveTag.default = true;
  - await TagStorage.saveTag(req.user.tenantID, firstActiveTag);
  - }
  - }
  // OCPI
  if (Utils.isComponentActiveFromToken(req.user, TenantComponents.OCPI)) {
  try {
  @@ -200,6 +184,22 @@ export default class TagService {
  });
  }
  }
  + // Delete the Tag
  + await TagStorage.deleteTag(req.user.tenantID, tag.id);
  + // Check if default deleted?
  + if (tag.default) {
  + // Clear all default
  + await TagStorage.clearDefaultUserTag(req.user.tenantID, tag.userID);
  + // Make the next active Tag the new default one
  + const firstActiveTag = await TagStorage.getFirstActiveUserTag(req.user.tenantID, tag.userID, {
  + issuer: true,
  + });
  + if (firstActiveTag) {
  + // Set default
  + firstActiveTag.default = true;
  + await TagStorage.saveTag(req.user.tenantID, firstActiveTag);
  + }
  + }
  // Log
  await Logging.logSecurityInfo({
  tenantID: req.user.tenantID,
  