Fixing issue of disabled headers not being set for unmigrated queries.
This commit is contained in:
parent
b11e4bd2df
commit
94041176d4
|
@ -41,9 +41,7 @@
|
|||
for (let [key, value] of Object.entries(obj)) {
|
||||
const field = fields.find(el => el.name === key)
|
||||
const idx = fields.indexOf(field)
|
||||
if (idx !== -1) {
|
||||
array[idx] = value
|
||||
}
|
||||
array[idx] = idx !== -1 ? value : true
|
||||
}
|
||||
return array
|
||||
}
|
||||
|
|
|
@ -145,6 +145,15 @@
|
|||
url = buildUrl(query.fields.path, breakQs)
|
||||
schema = schemaToFields(query.schema)
|
||||
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)
|
||||
if (query && !query.transformer) {
|
||||
query.transformer = "return data"
|
||||
|
|
Loading…
Reference in New Issue