From 7f00cfdd5adf69417c14226ab84ee50bf9ea0bbf Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Thu, 25 May 2017 13:12:40 -0400 Subject: [PATCH] set the inventory file to pristine on source change --- .../src/inventories/sources/add/sources-add.controller.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/awx/ui/client/src/inventories/sources/add/sources-add.controller.js b/awx/ui/client/src/inventories/sources/add/sources-add.controller.js index 573cd4bbbb..471f2dda7f 100644 --- a/awx/ui/client/src/inventories/sources/add/sources-add.controller.js +++ b/awx/ui/client/src/inventories/sources/add/sources-add.controller.js @@ -99,9 +99,6 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition', options: 'inventory_files', model: 'inventory_file' }); - - // TODO: figure out why the inventory file model is being set to - // dirty } $scope.lookupCredential = function(){ @@ -160,6 +157,7 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition', if (source === 'scm') { $scope.overwrite_vars = true; + $scope.inventory_source_form.inventory_file.$setPristine(); } else { $scope.overwrite_vars = false; }