mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
Tooljet db query - Filter condition should resolved dynamic variables used in the editor (#5080)
* fixes: filters were not resolved when a non string is passed * check for undefined and null * clean up
This commit is contained in:
parent
acefdb8400
commit
6826fdc8df
1 changed files with 1 additions and 2 deletions
|
|
@ -33,7 +33,7 @@ function buildPostgrestQuery(filters) {
|
||||||
postgrestQueryBuilder.order(column, order);
|
postgrestQueryBuilder.order(column, order);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isEmpty(column) && !isEmpty(operator) && !isEmpty(value)) {
|
if (!isEmpty(column) && !isEmpty(operator) && value && value !== '') {
|
||||||
postgrestQueryBuilder[operator](column, value.toString());
|
postgrestQueryBuilder[operator](column, value.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -56,7 +56,6 @@ async function listRows(queryOptions, organizationId, currentState) {
|
||||||
!isEmpty(orderQuery) && query.push(orderQuery);
|
!isEmpty(orderQuery) && query.push(orderQuery);
|
||||||
!isEmpty(limit) && query.push(`limit=${limit}`);
|
!isEmpty(limit) && query.push(`limit=${limit}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return await tooljetDatabaseService.findOne(organizationId, tableName, query.join('&'));
|
return await tooljetDatabaseService.findOne(organizationId, tableName, query.join('&'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue