Fix to properly handle empty extra_vars value. No longer sending 'null' to API.

This commit is contained in:
chouseknecht 2013-10-16 14:45:31 +00:00
parent d6bcd885c3
commit 9ff7f05dfc

View File

@ -413,7 +413,7 @@ function JobTemplatesEdit ($scope, $rootScope, $compile, $location, $log, $route
}
if (fld == 'variables') {
// Parse extra_vars, converting to YAML.
if ($.isEmptyObject(data.extra_vars) || data.extra_vars == "\{\}" || data.extra_vars == "null") {
if ($.isEmptyObject(data.extra_vars) || data.extra_vars == "\{\}" || data.extra_vars == "null" || data.extra_vars = "") {
scope.variables = "---";
}
else {