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
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) {