mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 11:25:08 -02:30
Set lookup value changed from something to nothing to be null
This commit is contained in:
committed by
Matthew Jones
parent
f93506fe2c
commit
b7071a48c2
@@ -66,7 +66,7 @@ function AtFormController (eventService, strings) {
|
|||||||
let data = vm.components
|
let data = vm.components
|
||||||
.filter(component => component.category === 'input')
|
.filter(component => component.category === 'input')
|
||||||
.reduce((values, component) => {
|
.reduce((values, component) => {
|
||||||
if (!component.state._value) {
|
if (component.state._value === undefined) {
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ function atInputLookupLink (scope, element, attrs, controllers) {
|
|||||||
inputController.init(scope, element, formController);
|
inputController.init(scope, element, formController);
|
||||||
}
|
}
|
||||||
|
|
||||||
function AtInputLookupController (baseInputController, $q, $state, $stateParams) {
|
function AtInputLookupController (baseInputController, $q, $state) {
|
||||||
let vm = this || {};
|
let vm = this || {};
|
||||||
|
|
||||||
let scope;
|
let scope;
|
||||||
@@ -82,6 +82,7 @@ function AtInputLookupController (baseInputController, $q, $state, $stateParams)
|
|||||||
scope.state._touched = true;
|
scope.state._touched = true;
|
||||||
|
|
||||||
if (scope.state._displayValue === '' && !scope.state._required) {
|
if (scope.state._displayValue === '' && !scope.state._required) {
|
||||||
|
scope.state._value = null;
|
||||||
return vm.check({ isValid: true });
|
return vm.check({ isValid: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,8 +117,7 @@ function AtInputLookupController (baseInputController, $q, $state, $stateParams)
|
|||||||
AtInputLookupController.$inject = [
|
AtInputLookupController.$inject = [
|
||||||
'BaseInputController',
|
'BaseInputController',
|
||||||
'$q',
|
'$q',
|
||||||
'$state',
|
'$state'
|
||||||
'$stateParams'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
function atInputLookup (pathService) {
|
function atInputLookup (pathService) {
|
||||||
|
|||||||
Reference in New Issue
Block a user