From 6162408b3d5d78fbdcc5a24258c90d1993b5b10d Mon Sep 17 00:00:00 2001 From: Pierpaolo Frasa Date: Thu, 21 Mar 2024 22:01:37 +0100 Subject: [PATCH] fix #1074: duplicate template Previously, duplicating wouldn't work correctly and overwrite the existing task. By explicitly setting the item's ID to null after copying the data, we avoid this behaviour. --- web/src/components/TemplateForm.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/components/TemplateForm.vue b/web/src/components/TemplateForm.vue index 0e45c05b..deae2c3c 100644 --- a/web/src/components/TemplateForm.vue +++ b/web/src/components/TemplateForm.vue @@ -431,6 +431,7 @@ export default { url: `/api/project/${this.projectId}/templates/${this.sourceItemId}`, responseType: 'json', })).data; + this.item.id = null; } this.advancedOptions = this.item.arguments != null || this.item.allow_override_args_in_task;