From 030eaf8ff130805e5878648eb96d94bb24fde450 Mon Sep 17 00:00:00 2001 From: Alex Happy <1223408988@qq.com> Date: Sun, 24 Nov 2024 20:52:11 +0800 Subject: [PATCH] fix link-records add email-column-match --- dtable_events/automations/actions.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dtable_events/automations/actions.py b/dtable_events/automations/actions.py index 201380a7..525c960c 100644 --- a/dtable_events/automations/actions.py +++ b/dtable_events/automations/actions.py @@ -1734,6 +1734,21 @@ def gen_filter(self, column, other_column): 'filter_predicate': self.COLUMN_FILTER_PREDICATE_MAPPING[ColumnTypes.DURATION] } + elif column['type'] == ColumnTypes.EMAIL: + if other_column['type'] in [ColumnTypes.TEXT, ColumnTypes.EMAIL]: + return { + 'column_key': other_column['key'], + 'filter_term': cell_value, + 'filter_predicate': self.COLUMN_FILTER_PREDICATE_MAPPING[other_column['type']] + } + elif other_column['type'] == ColumnTypes.FORMULA: + if other_column_data.get('result_type') == 'string': + return { + 'column_key': other_column['key'], + 'filter_term': cell_value, + 'filter_predicate': self.COLUMN_FILTER_PREDICATE_MAPPING[ColumnTypes.TEXT] + } + elif column['type'] == ColumnTypes.RATE: if other_column['type'] in [ColumnTypes.NUMBER, ColumnTypes.RATE]: return {