Fixing issue of disabled headers not being set for unmigrated queries.
This commit is contained in:
parent
b19fcb5d50
commit
1670c31ba7
|
@ -41,9 +41,7 @@
|
||||||
for (let [key, value] of Object.entries(obj)) {
|
for (let [key, value] of Object.entries(obj)) {
|
||||||
const field = fields.find(el => el.name === key)
|
const field = fields.find(el => el.name === key)
|
||||||
const idx = fields.indexOf(field)
|
const idx = fields.indexOf(field)
|
||||||
if (idx !== -1) {
|
array[idx] = idx !== -1 ? value : true
|
||||||
array[idx] = value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return array
|
return array
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,6 +145,15 @@
|
||||||
url = buildUrl(query.fields.path, breakQs)
|
url = buildUrl(query.fields.path, breakQs)
|
||||||
schema = schemaToFields(query.schema)
|
schema = schemaToFields(query.schema)
|
||||||
bindings = queryParametersToKeyValue(query.parameters)
|
bindings = queryParametersToKeyValue(query.parameters)
|
||||||
|
if (!query.fields.disabledHeaders) {
|
||||||
|
query.fields.disabledHeaders = {}
|
||||||
|
}
|
||||||
|
// make sure the disabled headers are set (migration)
|
||||||
|
for (let header of Object.keys(query.fields.headers)) {
|
||||||
|
if (!query.fields.disabledHeaders[header]) {
|
||||||
|
query.fields.disabledHeaders[header] = false
|
||||||
|
}
|
||||||
|
}
|
||||||
enabledHeaders = flipHeaderState(query.fields.disabledHeaders)
|
enabledHeaders = flipHeaderState(query.fields.disabledHeaders)
|
||||||
if (query && !query.transformer) {
|
if (query && !query.transformer) {
|
||||||
query.transformer = "return data"
|
query.transformer = "return data"
|
||||||
|
|
Loading…
Reference in New Issue