File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -61,12 +61,17 @@ def create_persons(dataset_description, collection):
6161 if 'email' in person :
6262 person_contact_information = omcore .ContactInformation (email = person ['email' ])
6363 if 'affiliation' in person :
64- person_affiliation = omcore .Affiliation (
65- member_of = omcore .Organization (full_name = person ['affiliation' ]))
64+ # Handle multiple affiliations separated by semicolon
65+ affiliations = [item .strip () for item in person ['affiliation' ].split (';' )]
66+ person_affiliation = []
67+ for aff in affiliations :
68+ person_affiliation .append (omcore .Affiliation (
69+ member_of = omcore .Organization (full_name = aff )))
70+
6671 openminds_person = omcore .Person (
6772 affiliations = person_affiliation , digital_identifiers = person_orcid , given_name = person ['given-names' ],
6873 family_name = person ['family-names' ], contact_information = person_contact_information )
69- openminds_list .append (openminds_person ),
74+ openminds_list .append (openminds_person )
7075 collection .add (openminds_person )
7176 return openminds_list
7277
You can’t perform that action at this time.
0 commit comments