Removed query filtering on dynamic variables in binding drawer

This commit is contained in:
Dean 2022-08-05 15:16:04 +01:00
parent e51c96a805
commit 5909ce62f7
1 changed files with 3 additions and 6 deletions

View File

@ -231,13 +231,10 @@
]
// convert dynamic variables list to simple key/val object
const getDynamicVariables = (datasource, queryId) => {
const getDynamicVariables = datasource => {
const variablesList = datasource?.config?.dynamicVariables
if (variablesList && variablesList.length > 0) {
const filtered = queryId
? variablesList.filter(variable => variable.queryId === queryId)
: variablesList
return filtered.reduce(
return variablesList.reduce(
(acc, next) => ({ ...acc, [next.name]: next.value }),
{}
)
@ -367,7 +364,7 @@
if (query && !query.fields.pagination) {
query.fields.pagination = {}
}
dynamicVariables = getDynamicVariables(datasource, query._id)
dynamicVariables = getDynamicVariables(datasource)
prettifyQueryRequestBody(
query,