From d7f05962cad5b830e894c6ab50bf4674ff603567 Mon Sep 17 00:00:00 2001 From: Keyna Rafael <95432445+keyn4@users.noreply.github.com> Date: Fri, 7 Jun 2024 08:07:11 -0500 Subject: [PATCH] fix 'Events' object has no attribute 'object' (#22) --- tap_stripe/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_stripe/client.py b/tap_stripe/client.py index 9b81524..c5d2256 100644 --- a/tap_stripe/client.py +++ b/tap_stripe/client.py @@ -155,7 +155,7 @@ def parse_response(self, response: requests.Response) -> Iterable[dict]: for record in records: # logic for incremental syncs - if (self.path == "events" and self.get_from_events) or self.get_data_from_id: + if self.name != "events" and ((self.path == "events" and self.get_from_events) or self.get_data_from_id): event_date = record["created"] if self.name not in ["plans", "products"]: record = record["data"]["object"]