diff --git a/tap_sailthru/streams.py b/tap_sailthru/streams.py index c9b68d0..a535023 100644 --- a/tap_sailthru/streams.py +++ b/tap_sailthru/streams.py @@ -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