Skip to content

Commit

Permalink
Fix get properties on row, if exists (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmesel authored Nov 20, 2023
1 parent e5251ea commit 3ba179a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tap_hubspot_beta/client_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ def get_url_params(
def post_process(self, row: dict, context: Optional[dict]) -> dict:
"""As needed, append or transform raw data to match expected structure."""
if self.properties_url:
for name, value in row["properties"].items():
row[name] = value.get("value")
del row["properties"]
if row.get("properties"):
for name, value in row.get("properties", {}).items():
row[name] = value.get("value")
del row["properties"]
for field in self.datetime_fields:
if row.get(field) is not None:
if row.get(field) in [0, ""]:
Expand Down

0 comments on commit 3ba179a

Please sign in to comment.