if (isNotEmptyArray(connectorStatus.chargingProfiles)) {
connectorStatus.chargingProfiles = connectorStatus.chargingProfiles.filter(
chargingProfile =>
- chargingProfile.chargingProfilePurpose !== ChargingProfilePurposeType.TX_PROFILE ||
- (chargingProfile.transactionId != null &&
+ (chargingProfile.chargingProfilePurpose === ChargingProfilePurposeType.TX_PROFILE &&
+ chargingProfile.transactionId != null &&
connectorStatus.transactionId != null &&
- chargingProfile.transactionId !== connectorStatus.transactionId)
+ chargingProfile.transactionId !== connectorStatus.transactionId) ||
+ chargingProfile.chargingProfilePurpose !== ChargingProfilePurposeType.TX_PROFILE
)
}
resetAuthorizeConnectorStatus(connectorStatus)