From: Jérôme Benoit Date: Fri, 9 Feb 2024 23:48:23 +0000 (+0100) Subject: fix: fix stationInfo persistent configuration default X-Git-Tag: v1.2.36~17 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a97d2d6ca3b18ee7e1f2c254eb8352d97507e8a7;p=e-mobility-charging-stations-simulator.git fix: fix stationInfo persistent configuration default Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 3c596bb9..aca295df 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1221,7 +1221,7 @@ export class ChargingStation extends EventEmitter { (stationInfoFromTemplate.stationInfoPersistentConfiguration = stationInfoPersistentConfiguration) const stationInfoFromFile = this.getStationInfoFromFile( - stationInfoFromTemplate.stationInfoPersistentConfiguration + stationInfoFromTemplate.stationInfoPersistentConfiguration ?? true ) // Priority: // 1. charging station info from template @@ -1716,10 +1716,7 @@ export class ChargingStation extends EventEmitter { configurationData, buildChargingStationAutomaticTransactionGeneratorConfiguration(this) ) - if ( - this.stationInfo?.automaticTransactionGeneratorPersistentConfiguration !== true || - this.getAutomaticTransactionGeneratorConfiguration() == null - ) { + if (this.stationInfo?.automaticTransactionGeneratorPersistentConfiguration !== true) { delete configurationData.automaticTransactionGenerator } if (this.connectors.size > 0) {