Skip to content

Commit

Permalink
chore: use map_record function
Browse files Browse the repository at this point in the history
  • Loading branch information
am6010 committed Nov 5, 2024
1 parent 35470d2 commit a0a671b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -589,14 +589,13 @@ def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapp
record["flow_id"] = flow
record["flow_message_id"] = flow_message_id
record["campaign_id"] = flow_message_id if not flow else None
record[self.cursor_field] = attributes[self.cursor_field]
profiles_data = record.get("relationships", {}).get("profile", {}).get("data", None)
if profiles_data:
profile_id = profiles_data.get("id", None)
if profile_id and profile_id in profile_cache:
profile = profile_cache.get(profile_id)
record["profile_email"] = profile.get("attributes", {}).get("email", None)

self.map_record(record)
yield process_record(record)


Expand Down

0 comments on commit a0a671b

Please sign in to comment.