vfbquery 0.2.9__py3-none-any.whl → 0.2.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vfbquery/vfb_queries.py +7 -4
- vfbquery-0.2.10.dist-info/METADATA +1169 -0
- vfbquery-0.2.10.dist-info/RECORD +10 -0
- vfbquery-0.2.9.dist-info/METADATA +0 -1168
- vfbquery-0.2.9.dist-info/RECORD +0 -10
- {vfbquery-0.2.9.dist-info → vfbquery-0.2.10.dist-info}/LICENSE +0 -0
- {vfbquery-0.2.9.dist-info → vfbquery-0.2.10.dist-info}/WHEEL +0 -0
- {vfbquery-0.2.9.dist-info → vfbquery-0.2.10.dist-info}/top_level.txt +0 -0
vfbquery/vfb_queries.py
CHANGED
|
@@ -249,8 +249,12 @@ def term_info_parse_object(results, short_form):
|
|
|
249
249
|
termInfo = {}
|
|
250
250
|
if results.hits > 0 and results.docs and len(results.docs) > 0:
|
|
251
251
|
termInfo["Meta"] = {}
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
try:
|
|
253
|
+
# Deserialize the term info from the first result
|
|
254
|
+
vfbTerm = deserialize_term_info(results.docs[0]['term_info'][0])
|
|
255
|
+
except KeyError:
|
|
256
|
+
print(f"SOLR doc missing 'term_info': {results.docs[0]}")
|
|
257
|
+
return None
|
|
254
258
|
queries = []
|
|
255
259
|
termInfo["Id"] = vfbTerm.term.core.short_form
|
|
256
260
|
termInfo["Meta"]["Name"] = "[%s](%s)"%(vfbTerm.term.core.label, vfbTerm.term.core.short_form)
|
|
@@ -282,7 +286,6 @@ def term_info_parse_object(results, short_form):
|
|
|
282
286
|
pass
|
|
283
287
|
except AttributeError:
|
|
284
288
|
print(f"vfbTerm.term.comment: {vfbTerm.term}")
|
|
285
|
-
|
|
286
289
|
if vfbTerm.parents and len(vfbTerm.parents) > 0:
|
|
287
290
|
parents = []
|
|
288
291
|
|
|
@@ -427,7 +430,7 @@ def term_info_parse_object(results, short_form):
|
|
|
427
430
|
if "image_" in key and not ("thumbnail" in key or "folder" in key) and len(vars(image)[key]) > 1:
|
|
428
431
|
record[key.replace("image_","")] = vars(image)[key].replace("http://","https://")
|
|
429
432
|
if len(image.index) > 0:
|
|
430
|
-
record[
|
|
433
|
+
record['index'] = int(image.index[0])
|
|
431
434
|
vars(image).keys()
|
|
432
435
|
image_vars = vars(image)
|
|
433
436
|
if 'center' in image_vars.keys():
|