1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-10-08 02:28:57 +03:00

🐛 Fix issue filtering field date type on Notion-Node (#2001)

This commit is contained in:
Ricardo Espinoza 2021-07-18 08:08:43 -04:00 committed by GitHub
parent b531f31512
commit 5d15d85f08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -347,9 +347,10 @@ export function mapFilters(filters: IDataObject[], timezone: string) {
key = 'text';
} else if (key === 'phone_number') {
key = 'phone';
} else if (key === 'date') {
} else if (key === 'date' && !['is_empty', 'is_not_empty'].includes(value.condition as string)) {
valuePropertyName = (valuePropertyName !== undefined && !Object.keys(valuePropertyName).length) ? {} : moment.tz(value.date, timezone).utc().format();
}
return Object.assign(obj, {
['property']: getNameAndType(value.key).name,
[key]: { [`${value.condition}`]: valuePropertyName },