From d2453e20ec96773b6c0ba547cc43b4aa4b8db186 Mon Sep 17 00:00:00 2001 From: yujoy Date: Wed, 18 Sep 2024 16:47:59 -0400 Subject: [PATCH] add condition if self.stream_state.get(starting_replication_value) is None --- tap_sailthru/streams.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_sailthru/streams.py b/tap_sailthru/streams.py index 6d5a318..0e588d9 100644 --- a/tap_sailthru/streams.py +++ b/tap_sailthru/streams.py @@ -160,7 +160,7 @@ def prepare_request_payload( """ # set the start date to 7 days before the last replication state - starting_replication_time = self.stream_state.get("starting_replication_value") + starting_replication_time = self.stream_state.get("starting_replication_value") or self.config.get('start_date') starting_replication_date = pendulum.parse(starting_replication_time) starting_replication_date_minus_7 = starting_replication_date.subtract(days=7).start_of('day') start_date = starting_replication_date_minus_7.to_date_string()