Skip to content

Commit

Permalink
Fix error when editing event chairpersons (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
duartegalvao authored Nov 7, 2024
1 parent 65f027a commit b0bf306
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions indico_jacow/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ def _person_link_schema_pre_load(self, sender, data, **kwargs):
g.jacow_affiliations_ids = {data['email']: data.get('jacow_affiliations_ids', [])}

def _person_link_schema_post_dump(self, sender, data, orig, **kwargs):
if not all(isinstance(p, (AbstractPersonLink, ContributionPersonLink)) for p in orig):
return
for person, person_link in zip(data, orig, strict=True):
person['jacow_affiliations_ids'] = [ja.affiliation.id for ja in person_link.jacow_affiliations]
person['jacow_affiliations_meta'] = [ja.details for ja in person_link.jacow_affiliations]
Expand Down

0 comments on commit b0bf306

Please sign in to comment.