Skip to content

Commit 36752cf

Browse files
committed
Fix institution type
1 parent 63bd8c0 commit 36752cf

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

edit_tccon.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
group = {'contributorName':'TCCON','contributorType':'ResearchGroup'}
2424
new = ''
2525
for c in record['contributors']:
26+
print(c['contributorType'])
2627
if c['contributorType'] == 'HostingInstitution':
27-
c['contributorName'] == \
28+
print("YES")
29+
c['contributorName'] = \
2830
'California Institute of Techonolgy, Pasadena, CA (US)'
29-
c['contributorIdentifiers']=\
30-
[{'contributorIdentifier': 'grid.20861.3d',
31-
'contributorIdentifierScheme': 'GRID'}]
31+
c['nameIdentifiers']=\
32+
[{'nameIdentifier': 'grid.20861.3d',
33+
'nameIdentifierScheme': 'GRID'}]
3234
v = record['contributors']
3335
v.append(group)
3436
contact = record['creators'][int(sys.argv[3])]
@@ -37,5 +39,6 @@
3739
contact['contributorType'] = 'ContactPerson'
3840
v.append(contact)
3941
new = {'contributors':v}
42+
print(new)
4043
response = caltechdata_edit(token, rid, new, {}, {}, production)
4144
print(response)

0 commit comments

Comments
 (0)