Fixed bug that was preventing wfjt survey deletion

This commit is contained in:
Michael Abashian 2017-01-13 16:10:21 -05:00
parent 696d00320f
commit 05c3f5fbea
2 changed files with 5 additions and 2 deletions

View File

@ -13,6 +13,7 @@ export default
var scope = params.scope,
id = params.id,
templateType = params.templateType,
url;
@ -35,7 +36,8 @@ export default
scope.$emit("SurveyDeleted");
} else {
url = GetBasePath('job_templates')+ id + '/survey_spec/';
let basePath = templateType === 'workflow_job_template' ? GetBasePath('workflow_job_templates') : GetBasePath('job_templates');
url = basePath + id + '/survey_spec/';
Rest.setUrl(url);
Rest.destroy()

View File

@ -52,7 +52,8 @@ export default
// and closing the modal after success
DeleteSurvey({
scope: scope,
id: id
id: id,
templateType: templateType
});
};