fix(Notion Node): Fix is_empty query on formula fields (#8397)

This commit is contained in:
Elias Meire 2024-01-22 12:39:53 +01:00 committed by GitHub
parent d597c2ab29
commit 08e7db4648
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -559,6 +559,9 @@ export function mapFilters(filtersList: IDataObject[], timezone: string) {
}
if (value.type === 'formula') {
if (['is_empty', 'is_not_empty'].includes(value.condition as string)) {
key = value.returnType;
} else {
const vpropertyName = value[`${camelCase(value.returnType as string)}Value`];
return Object.assign(obj, {
@ -566,6 +569,7 @@ export function mapFilters(filtersList: IDataObject[], timezone: string) {
[key]: { [value.returnType]: { [`${value.condition}`]: vpropertyName } },
});
}
}
return Object.assign(obj, {
['property']: getNameAndType(value.key as string).name,