Skip to content

Commit

Permalink
add source_signup error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
hkuffel committed Apr 12, 2023
1 parent ae94846 commit 34e0e05
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tap_sailthru/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,12 @@ def post_process(self, row: dict, context: Optional[dict]) -> dict:
if "source_signup_count" in keys_arr:
source_signup_count_dict = row.copy()["source_signup_count"]
new_source_signup_count_arr = []
for k, v in source_signup_count_dict.items():
new_source_signup_count_arr.append({"source": k, "count": v})
row["source_signup_count"] = new_source_signup_count_arr
try:
for k, v in source_signup_count_dict.items():
new_source_signup_count_arr.append({"source": k, "count": v})
row["source_signup_count"] = new_source_signup_count_arr
except AttributeError:
row["source_signup_count"] = []
return row


Expand Down

0 comments on commit 34e0e05

Please sign in to comment.