From b0cc97db801cbe8cc07cff3edd619bc616252664 Mon Sep 17 00:00:00 2001 From: rhenck <richard.henck@iqb.hu-berlin.de> Date: Wed, 24 May 2023 18:50:30 +0200 Subject: [PATCH] [editor] Disuse SanitizationService Sanitization is now done within classes. Keep the Service in the code for now. --- projects/editor/src/app/services/unit.service.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/projects/editor/src/app/services/unit.service.ts b/projects/editor/src/app/services/unit.service.ts index 158793a38..6a8260445 100644 --- a/projects/editor/src/app/services/unit.service.ts +++ b/projects/editor/src/app/services/unit.service.ts @@ -49,14 +49,9 @@ export class UnitService { if (unitDefinition) { try { const unitDef = JSON.parse(unitDefinition); - this.sanitizationService.checkAndRepairIDs(unitDef, this.idService, this.messageService); - if (SanitizationService.isUnitDefinitionOutdated(unitDef)) { - this.unit = new Unit(this.sanitizationService.sanitizeUnitDefinition(unitDef)); - this.messageService.showMessage(this.translateService.instant('outdatedUnit')); - } else { - this.unit = new Unit(unitDef); - } + this.unit = new Unit(unitDef); } catch (e) { + console.error(e); this.messageService.showError('Unit definition konnte nicht gelesen werden!'); this.unit = new Unit(); } -- GitLab