Skip to content

Commit

Permalink
add condition if self.stream_state.get(starting_replication_value) is…
Browse files Browse the repository at this point in the history
… None
  • Loading branch information
yujoy committed Sep 18, 2024
1 parent 949e5a5 commit d2453e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tap_sailthru/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d2453e2

Please sign in to comment.