def _save_identifiers_oaiharvest(obj, eng): from inspire.utils.knowledge import save_keys_to_kb identifiers = [] report_numbers = obj.get_data().get('report_number', []) for number in report_numbers: if number.get("source", "").lower() == "arxiv": arxiv_id = number.get("primary") identifiers.append(arxiv_id) save_keys_to_kb(kb_name, identifiers, obj.id)
def _save_identifiers_to_kb(obj, eng): from inspire.utils.knowledge import save_keys_to_kb record = get_record_from_obj(obj, eng) identifiers = record.get(identifier_key, []) save_keys_to_kb(kb_name, identifiers, obj.id)