From 27f4ed23a142d7a31284d255faf40607e144206d Mon Sep 17 00:00:00 2001 From: Kyle Allan Date: Tue, 27 Aug 2019 17:21:03 +0000 Subject: [PATCH 1/2] skip syncing subobjects when encountering deleted events --- tap_stripe/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tap_stripe/__init__.py b/tap_stripe/__init__.py index 5781f6a0..6cc2988a 100755 --- a/tap_stripe/__init__.py +++ b/tap_stripe/__init__.py @@ -729,6 +729,10 @@ def sync_event_updates(stream_name): time_extracted=extraction_time) Context.updated_counts[stream_name] += 1 + # Delete events should be synced but not their subobjects + if events_obj.get('type', '').endswith('deleted'): + continue + if sub_stream_name and Context.is_selected(sub_stream_name): if event_resource_obj: sync_sub_stream(sub_stream_name, From e03aba81a72f53c468f114727597133284e12a36 Mon Sep 17 00:00:00 2001 From: Kyle Allan Date: Tue, 27 Aug 2019 18:27:49 +0000 Subject: [PATCH 2/2] use . --- tap_stripe/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_stripe/__init__.py b/tap_stripe/__init__.py index 6cc2988a..ab1efb6c 100755 --- a/tap_stripe/__init__.py +++ b/tap_stripe/__init__.py @@ -730,7 +730,7 @@ def sync_event_updates(stream_name): Context.updated_counts[stream_name] += 1 # Delete events should be synced but not their subobjects - if events_obj.get('type', '').endswith('deleted'): + if events_obj.get('type', '').endswith('.deleted'): continue if sub_stream_name and Context.is_selected(sub_stream_name):