Skip to content

Commit

Permalink
fix: state_type incorrect reference (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabino authored Feb 28, 2024
1 parent 919385e commit fc42fbd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tap_airbyte/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,13 +654,14 @@ def sync_all(self) -> None: # type: ignore
self._process_log_message(airbyte_message)
elif airbyte_message["type"] == AirbyteMessage.STATE:
state_message = airbyte_message["state"]
state_type = state_message["type"]
if "data" in state_message:
unpacked_state = state_message["data"]
elif "type" == "STREAM":
elif state_type == "STREAM":
unpacked_state = state_message["stream"]
elif "type" == "GLOBAL":
elif state_type == "GLOBAL":
unpacked_state = state_message["global"]
elif "type" == "LEGACY":
elif state_type == "LEGACY":
unpacked_state = state_message["legacy"]
self.airbyte_state = unpacked_state
with STDOUT_LOCK:
Expand Down

0 comments on commit fc42fbd

Please sign in to comment.