fix: [module extrsctor] fix invalid object meta

This commit is contained in:
terrtia 2025-01-22 11:59:28 +01:00
parent e0a8f4cc37
commit 02aa9a983b
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
2 changed files with 7 additions and 3 deletions

View file

@ -90,7 +90,7 @@ def get_obj_queued():
return ['barcode', 'item', 'image', 'message', 'ocr', 'qrcode'] # screenshot ??? return ['barcode', 'item', 'image', 'message', 'ocr', 'qrcode'] # screenshot ???
def get_objects_tracked(): def get_objects_tracked():
return ['barcode', 'decoded', 'item', 'pgp', 'message', 'ocr', 'qrcode', 'title'] return ['barcode', 'decoded', 'item', 'message', 'ocr', 'pgp', 'qrcode', 'title']
def get_objects_retro_hunted(): def get_objects_retro_hunted():
return ['decoded', 'item', 'message', 'ocr'] return ['decoded', 'item', 'message', 'ocr']

View file

@ -302,8 +302,12 @@ def get_extracted_by_match(extracted):
obj_id = row_id[0] obj_id = row_id[0]
matches[str_obj]['subtype'] = subtype matches[str_obj]['subtype'] = subtype
matches[str_obj]['id'] = obj_id matches[str_obj]['id'] = obj_id
matches[str_obj]['icon'] = ail_objects.get_object_svg(ob_type, subtype, obj_id) try:
matches[str_obj]['link'] = ail_objects.get_object_link(ob_type, subtype, obj_id) matches[str_obj]['icon'] = ail_objects.get_object_svg(ob_type, subtype, obj_id)
matches[str_obj]['link'] = ail_objects.get_object_link(ob_type, subtype, obj_id)
except TypeError:
matches[str_obj]['icon'] = {'style': 'fas', 'icon': '\uf00d', 'color': 'red', 'radius': 5}
matches[str_obj]['link'] = ''
matches[str_obj]['matches'] = [] matches[str_obj]['matches'] = []