Update src/server/ocpp/utils/OCPPUtils.ts
MODIFY
src/server/ocpp/utils/OCPPUtils.ts
src/server/ocpp/utils/OCPPUtils.ts
@@ -1326,7 +1326,7 @@ export default class OCPPUtils {
} catch (error) {
await Logging.logError({
tenantID: tenant.id,
- siteID: chargingProfile.chargingStation.siteID,
+ siteID: chargingProfile.chargingStation?.siteID,
source: chargingProfile.chargingStationID,
action: ServerAction.CHARGING_PROFILE_DELETE,
module: MODULE_NAME, method: 'clearAndDeleteChargingProfilesForSiteArea',

Update src/server/ocpp/utils/OCPPUtils.ts

Co-authored-by: Claude ROSSI <claude.rossi@sap.com>