From e18791a65764a8d8093e4f4464968ff850656a48 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Sun, 25 Oct 2015 14:43:22 -0700 Subject: [PATCH] Integer Directive was returning false for a blank string this was causing the integer directive to throw an error if the user entered something in the field, then erased it. --- awx/ui/client/src/shared/directives.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui/client/src/shared/directives.js b/awx/ui/client/src/shared/directives.js index 2b005b06d0..c97f40b5ca 100644 --- a/awx/ui/client/src/shared/directives.js +++ b/awx/ui/client/src/shared/directives.js @@ -275,7 +275,7 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'JobsHelper']) if (/^\-?\d*$/.test(viewValue)) { // it is valid ctrl.$setValidity('integer', true); - if ( viewValue === '-' || viewValue === '-0' || viewValue === '' || viewValue === null) { + if ( viewValue === '-' || viewValue === '-0' || viewValue === null) { ctrl.$setValidity('integer', false); return viewValue; }