From c0d4fe66f48fd1e1ba745ed385670d790226e452 Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Tue, 30 Jul 2013 18:10:29 -0400 Subject: [PATCH] AC-320 free_instances value is no longer being dropped when == 0. --- awx/ui/static/lib/ansible/license.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/awx/ui/static/lib/ansible/license.js b/awx/ui/static/lib/ansible/license.js index e72b704c18..cd163fceaa 100644 --- a/awx/ui/static/lib/ansible/license.js +++ b/awx/ui/static/lib/ansible/license.js @@ -94,7 +94,7 @@ angular.module('License', ['RestServices', 'Utilities', 'FormGenerator', 'Prompt function empty(x) { var result = false; - if (x === null || x === undefined || x == '') { + if (x != 0 && (x === null || x === undefined || x == '') ) { result = true; } return result; @@ -146,9 +146,8 @@ angular.module('License', ['RestServices', 'Utilities', 'FormGenerator', 'Prompt }); } - // Remove anything form the form that is empty for (var fld in form.fields) { - if (data['license_info'][fld]) { + if (data['license_info'][fld] !== undefined) { scope[fld] = data['license_info'][fld]; } }