Do not delete QA templates
MODIFY
src/storage/mongodb/ChargingStationStorage.ts
src/storage/mongodb/ChargingStationStorage.ts
@@ -113,7 +113,9 @@ export default class ChargingStationStorage {
// Debug
const uniqueTimerID = Logging.traceStart(Constants.DEFAULT_TENANT, MODULE_NAME, 'deleteChargingStationTemplates');
// Delete all records
- await global.database.getCollection<ChargingStationTemplate>(Constants.DEFAULT_TENANT, 'chargingstationtemplates').deleteMany({});
+ await global.database.getCollection<ChargingStationTemplate>(Constants.DEFAULT_TENANT, 'chargingstationtemplates').deleteMany(
+ { qa: { $not: { $eq: true } } }
+ );
// Debug
Logging.traceEnd(Constants.DEFAULT_TENANT, MODULE_NAME, 'deleteChargingStationTemplates', uniqueTimerID);
}

MODIFY
src/types/ChargingStation.ts
src/types/ChargingStation.ts
@@ -183,6 +183,7 @@ export enum Voltage {
export interface ChargingStationTemplate {
id?: string;
+ qa?: boolean;
hash?: string;
hashTechnical?: string;
hashCapabilities?: string;

Do not delete QA templates