1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 22:21:13 +03:00

Merge pull request #4704 from keithjgrant/4522-save-nt-after-fixing-form-errors

Fix Notification Template form validation of headers field

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-09-10 19:56:33 +00:00 committed by GitHub
commit 7646185e2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ export default ['Rest', 'Wait', 'NotificationsFormObject',
$scope.$watch('headers', function validate_headers(str) {
try {
let headers = JSON.parse(str);
const headers = typeof str === 'string' ? JSON.parse(str) : str;
if (_.isObject(headers) && !_.isArray(headers)) {
let valid = true;
for (let k in headers) {

View File

@ -189,7 +189,7 @@ export default ['Rest', 'Wait',
$scope.$watch('headers', function validate_headers(str) {
try {
let headers = JSON.parse(str);
const headers = typeof str === 'string' ? JSON.parse(str) : str;
if (_.isObject(headers) && !_.isArray(headers)) {
let valid = true;
for (let k in headers) {