From 4ed69464c4286be1bca02ae86c58c59188893d61 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 25 Feb 2023 15:40:07 +0800 Subject: [PATCH] fix(nocodb): revise isWithin logic in airtable migration --- .../src/lib/meta/api/sync/helpers/job.ts | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts b/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts index e41185fbcd..c6b563b47d 100644 --- a/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts +++ b/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts @@ -2003,38 +2003,6 @@ export default async ( let value = null; if (['isEmpty', 'isNotEmpty'].includes(filter.operator)) { comparison_op = filter.operator === 'isEmpty' ? 'blank' : 'notblank'; - } else if (filter.operator === 'isWithin') { - switch (filter.value.mode) { - case 'pastWeek': - comparison_sub_op = 'oneWeekAgo'; - break; - case 'pastMonth': - comparison_sub_op = 'oneMonthAgo'; - break; - case 'pastYear': - comparison_sub_op = 'daysAgo'; - value = 365; - break; - case 'nextWeek': - comparison_sub_op = 'oneWeekFromNow'; - break; - case 'nextMonth': - comparison_sub_op = 'oneMonthFromNow'; - break; - case 'nextYear': - comparison_sub_op = 'daysFromNow'; - value = 365; - break; - case 'pastNumberOfDays': - comparison_sub_op = 'daysAgo'; - value = filter.value.numberOfDays; - break; - case 'nextNumberOfDays': - comparison_sub_op = 'daysFromNow'; - value = filter.value.numberOfDays; - break; - } - comparison_op = filter.operator; } else { if ('numberOfDays' in filter.value) { value = filter.value['numberOfDays'];