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 b0ecce0 commit 054479aCopy full SHA for 054479a
caltechdata_api/decustomize_schema.py
@@ -164,8 +164,14 @@ def decustomize_schema(json_record):
164
for g in geo:
165
if 'geoLocationPoint' in g:
166
pt = g['geoLocationPoint']
167
- pt['pointLatitude'] = float(pt['pointLatitude'])
168
- pt['pointLongitude'] = float(pt['pointLongitude'])
+ if isinstance(pt,list):
+ newp = {}
169
+ newp['pointLatitude'] = float(pt[0]['pointLatitude'])
170
+ newp['pointLongitude'] = float(pt[0]['pointLongitude'])
171
+ g['geoLocationPoint'] = newp
172
+ else:
173
+ pt['pointLatitude'] = float(pt['pointLatitude'])
174
+ pt['pointLongitude'] = float(pt['pointLongitude'])
175
json_record['geoLocations']=json_record.pop('geographicCoverage')
176
else:
177
newgeo = {}
0 commit comments