Returning default tenant object if tenant is invalid
MODIFY
src/server/ocpp/json/WSConnection.ts
src/server/ocpp/json/WSConnection.ts
@@ -336,8 +336,12 @@ export default abstract class WSConnection {
}
public getTenant(): Tenant {
+ if (this.isTenantValid()) {
return this.tenant;
}
+ // No: go to the master tenant
+ return Constants.DEFAULT_TENANT_OBJECT;
+ }
public getToken(): string {
return this.token;

Returning default tenant object if tenant is invalid