fix(Evaluation Trigger Node): Await for getDataTableFilter which is now async (no-changelog) (#19775)

This commit is contained in:
Jaakko Husso 2025-09-19 17:05:18 +03:00 committed by GitHub
parent ff0c59c92b
commit 982397f315
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -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,

View File

@ -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>({