Skip to content

Commit

Permalink
Reverts the json.loads of json objects
Browse files Browse the repository at this point in the history
  • Loading branch information
vmesel committed Dec 18, 2023
1 parent 34c1f78 commit 40eb302
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions target_salesforce_v3/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ def reference_data(self):

def preprocess_record(self, record: dict, context: dict):

if isinstance(record.get("addresses"), str):
record["addresses"] = json.loads(record["addresses"])

if isinstance(record.get("phone_numbers"), str):
record["phone_numbers"] = json.loads(record.get("phone_numbers"))

if isinstance(record.get("campaigns"), str):
record["campaigns"] = json.loads(record.get("campaigns"))

record = self.validate_input(record)

# Handles creation/update of Leads and Contacts
Expand Down

0 comments on commit 40eb302

Please sign in to comment.