Skip to content

Commit 3b38629

Browse files
committed
Fix multiple affiliation problem
1 parent fb4fcac commit 3b38629

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

caltech_thesis.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ def epxml_to_datacite(eprint):
7979
new['familyName'] = name['family']
8080
newc.append(new)
8181
if 'local_group' in eprint:
82-
newc.append({'contributorName':eprint['local_group']['item'],'contributorType':'ResearchGroup'})
82+
group_field = eprint['local_group']['item']
83+
if type(group_field) is str:
84+
newc.append({'contributorName':group_field,'contributorType':'ResearchGroup'})
85+
else:
86+
for group in group_field:
87+
newc.append({'contributorName':group,'contributorType':'ResearchGroup'})
8388
metadata['contributors'] = newc
8489

8590
metadata['creators'] = newa

0 commit comments

Comments
 (0)