mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-01 17:27:14 +02:00
fix(Evaluation Trigger Node): Await for getDataTableFilter which is now async (no-changelog) (#19775)
This commit is contained in:
parent
ff0c59c92b
commit
982397f315
|
|
@ -207,7 +207,7 @@ export class EvaluationTrigger implements INodeType {
|
|||
}) as string;
|
||||
const dataTableProxy = await this.helpers.getDataStoreProxy(dataTableId);
|
||||
|
||||
const filter = getDataTableFilter(this, 0);
|
||||
const filter = await getDataTableFilter(this, 0);
|
||||
|
||||
const { data, count } = await dataTableProxy.getManyRowsAndCount({
|
||||
skip: currentIndex,
|
||||
|
|
@ -330,7 +330,7 @@ export class EvaluationTrigger implements INodeType {
|
|||
}) as string;
|
||||
const dataTableProxy = await this.helpers.getDataStoreProxy(dataTableId);
|
||||
|
||||
const filter = getDataTableFilter(this, 0);
|
||||
const filter = await getDataTableFilter(this, 0);
|
||||
const { data } = await dataTableProxy.getManyRowsAndCount({
|
||||
skip: 0,
|
||||
take: maxRows,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ describe('Evaluation Trigger Node', () => {
|
|||
getNode: jest.fn().mockReturnValue({ typeVersion: 4.6 }),
|
||||
});
|
||||
|
||||
let mockDataTable: { getManyRowsAndCount: jest.Mock };
|
||||
let mockDataTable: { getManyRowsAndCount: jest.Mock; getColumns: jest.Mock };
|
||||
|
||||
describe('execute', () => {
|
||||
describe('without filters', () => {
|
||||
|
|
@ -329,6 +329,10 @@ describe('Evaluation Trigger Node', () => {
|
|||
{ id: 2, field1: 'value3', field2: 'value4' },
|
||||
],
|
||||
}),
|
||||
getColumns: jest.fn().mockResolvedValue([
|
||||
{ name: 'field1', type: 'string' },
|
||||
{ name: 'field2', type: 'string' },
|
||||
]),
|
||||
};
|
||||
|
||||
mockExecuteFunctions = mockDeep<IExecuteFunctions>({
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user