Skip to content

Commit

Permalink
Fix relation sync
Browse files Browse the repository at this point in the history
  • Loading branch information
rixx committed Nov 15, 2024
1 parent 4f39672 commit cfe3145
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pretalx_salesforce/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def serialize_relations(self):
"Contact__c": speaker.event_profile(
self.submission.event
).salesforce_profile_sync.salesforce_id,
"Name": f"{speaker.name}{self.submission.title}",
"Name": ellipsis(f"{speaker.name}{self.submission.title}"),
"pretalx_LegacyID__c": f"{speaker.code}-{self.submission.code}",
}
for speaker in self.submission.speakers.all()
Expand Down Expand Up @@ -226,7 +226,7 @@ def sync_relations(self, sf=None, force=False):
# need to update it
continue
result = sf.Contact_Session__c.create(relation)
speaker_id = relation["Contact__c"]["pretalx_LegacyID__c"]
speaker_id = relation["Contact__c"]
self.synced_data["relation_mapping"][speaker_id] = result["id"]
self.synced_data["relations"].append(relation)

Expand Down

0 comments on commit cfe3145

Please sign in to comment.