Variable parsing

added a check for variables that are passed with double curly brackets '{{}}' and JT throws an error and doesn't save now
This commit is contained in:
Jared Tabor
2014-10-31 11:23:57 -04:00
parent 9e2571f853
commit f4ac4a0bf9
3 changed files with 14 additions and 9 deletions
@@ -907,6 +907,9 @@ function JobTemplatesEdit($scope, $rootScope, $compile, $location, $log, $routeP
try {
// Make sure we have valid variable data
data.extra_vars = ToJSON($scope.parseType, $scope.variables, true);
if(data.extra_vars === undefined ){
throw 'undefined variables';
}
for (fld in form.fields) {
if (form.fields[fld].type === 'select' && fld !== 'playbook') {
data[fld] = $scope[fld].value;