We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10086fa commit 872dd3fCopy full SHA for 872dd3f
caltechdata_api/customize_schema.py
@@ -103,10 +103,16 @@ def customize_schema(json_record):
103
104
if "dates" in json_record:
105
dates = json_record['dates']
106
+ priority = False
107
for d in dates:
108
#If metadata has Submitted date, we can get a full date in TIND
109
if d['dateType']=='Submitted':
110
json_record["publicationDate"]=d['date']
111
+ priority = True
112
+ #If we have an Issued but not a Submitted date, save full date
113
+ if d['dateType']=='Issued':
114
+ if priority == False:
115
+ json_record["publicationDate"]=d['date']
116
d['relevantDateValue']=str(d.pop('date'))
117
d['relevantDateType']=d.pop('dateType')
118
json_record['relevantDates']=json_record.pop('dates')
0 commit comments