diff --git a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.model.ts b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.model.ts index dfb197c5a..65869ba1f 100644 --- a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.model.ts +++ b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.model.ts @@ -47,6 +47,7 @@ export class PlanEditorModel extends BaseEditorModel implements PlanPersist { item.blueprint.definition.sections.forEach(section => { if (section.hasTemplates) { + const isNew = (item.id == null); const sectionTemplatesFromPlan = item.planDescriptionTemplates?.filter(x => x.sectionId == section.id && x.isActive == IsActive.Active) || []; if (sectionTemplatesFromPlan.length > 0) { @@ -57,7 +58,7 @@ export class PlanEditorModel extends BaseEditorModel implements PlanPersist { descriptionTemplateGroupId: planDescriptionTemplate?.descriptionTemplateGroupId, })); }); - } else if (section.descriptionTemplates?.length > 0) { + } else if (section.descriptionTemplates?.length > 0 && isNew) { section.descriptionTemplates.forEach(blueprintDefinedDescriptionTemplate => { this.descriptionTemplates.push(new PlanDescriptionTemplateEditorModel(this.validationErrorModel).fromModel( {