From 42e1e28e27787b712268fff344ff93c008d62c61 Mon Sep 17 00:00:00 2001 From: Florent BENOIT Date: Fri, 26 Feb 2016 18:11:22 +0100 Subject: [PATCH] CHE-622 Do not import templates commands if user is providing its own location Change-Id: I603080bb67ef9bc8b64c80c06ef47ada3dfb6bfe Signed-off-by: Florent BENOIT --- .../projects/create-project/create-project.controller.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dashboard/src/app/projects/create-project/create-project.controller.js b/dashboard/src/app/projects/create-project/create-project.controller.js index 2437a7e0fae..0f1bd1e6b94 100755 --- a/dashboard/src/app/projects/create-project/create-project.controller.js +++ b/dashboard/src/app/projects/create-project/create-project.controller.js @@ -447,6 +447,11 @@ export class CreateProjectCtrl { } else if (projectData.source.location.length > 0) { + // if it's a user-defined location we need to cleanup commands that may have been configured by templates + if (this.selectSourceOption === 'select-source-existing') { + projectData.project.commands = []; + } + // websocket channel channel = 'importProject:output:' + workspaceId + ':' + projectName; @@ -469,6 +474,8 @@ export class CreateProjectCtrl { let commands = projectData.project.commands; if (commands && commands.length > 0) { this.addCommand(workspaceId, projectName, commands, 0, deferredAddCommand); + } else { + deferredAddCommand.resolve('no commands to add'); } deferredImport.resolve(); }, (error) => {