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:
commit
7646185e2c
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user