set the inventory file to pristine on source change

This commit is contained in:
John Mitchell 2017-05-25 13:12:40 -04:00
parent a229259559
commit 7f00cfdd5a

View File

@ -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;
}