mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
send empty string for email username/password if no user input
This commit is contained in:
@@ -154,7 +154,7 @@ export default ['$rootScope', 'Rest', 'Wait', 'NotificationsFormObject',
|
|||||||
if (field.type === 'number') {
|
if (field.type === 'number') {
|
||||||
$scope[i] = Number($scope[i]);
|
$scope[i] = Number($scope[i]);
|
||||||
}
|
}
|
||||||
if (field.name === "username" && $scope.notification_type.value === "email" && value === null) {
|
if (i === "username" && $scope.notification_type.value === "email" && value === null) {
|
||||||
$scope[i] = "";
|
$scope[i] = "";
|
||||||
}
|
}
|
||||||
if (field.type === 'sensitive' && value === null) {
|
if (field.type === 'sensitive' && value === null) {
|
||||||
|
|||||||
@@ -241,10 +241,10 @@ export default ['Rest', 'Wait',
|
|||||||
if (field.type === 'number') {
|
if (field.type === 'number') {
|
||||||
$scope[i] = Number($scope[i]);
|
$scope[i] = Number($scope[i]);
|
||||||
}
|
}
|
||||||
if (field.name === "username" && $scope.notification_type.value === "email" && value === null) {
|
if (i === "username" && $scope.notification_type.value === "email" && (value === null || value === undefined)) {
|
||||||
$scope[i] = "";
|
$scope[i] = "";
|
||||||
}
|
}
|
||||||
if (field.type === 'sensitive' && value === null) {
|
if (field.type === 'sensitive' && (value === null || value === undefined)) {
|
||||||
$scope[i] = "";
|
$scope[i] = "";
|
||||||
}
|
}
|
||||||
return $scope[i];
|
return $scope[i];
|
||||||
@@ -256,8 +256,8 @@ export default ['Rest', 'Wait',
|
|||||||
|
|
||||||
delete params.notification_configuration.email_options;
|
delete params.notification_configuration.email_options;
|
||||||
|
|
||||||
params.notification_configuration.use_ssl = $scope.use_ssl;
|
params.notification_configuration.use_ssl = Boolean($scope.use_ssl);
|
||||||
params.notification_configuration.use_tls = $scope.use_tls;
|
params.notification_configuration.use_tls = Boolean($scope.use_tls);
|
||||||
|
|
||||||
Wait('start');
|
Wait('start');
|
||||||
Rest.setUrl(url + id + '/');
|
Rest.setUrl(url + id + '/');
|
||||||
|
|||||||
Reference in New Issue
Block a user