mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
fix NT validation of headers after saving
This commit is contained in:
parent
a3a5db1c44
commit
8192b79b1f
@ -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…
x
Reference in New Issue
Block a user