Merge pull request #1975 from rohithmenon/bugfix/query_based_param

Bugfix/query based param
This commit is contained in:
Arik Fraimovich 2017-10-01 14:32:48 +03:00 committed by GitHub
commit b0bec26138

View File

@ -60,17 +60,17 @@ const QueryBasedParameterComponent = {
let valueColumn = null;
columns.forEach((column) => {
const columnName = column.name.toLowerCase();
if (column.type === 'string' && columnName === 'name') {
if (columnName === 'name') {
nameColumn = column.name;
}
if (column.type === 'string' && columnName === 'value') {
if (columnName === 'value') {
valueColumn = column.name;
}
// Assign first string column as name and value column.
if (nameColumn === null && column.type === 'string') {
if (nameColumn === null) {
nameColumn = column.name;
}
if (valueColumn === null && column.type === 'string') {
if (valueColumn === null) {
valueColumn = column.name;
}
});