Skip to content
Snippets Groups Projects
Commit b0a7a2fc authored by Christoph Alt's avatar Christoph Alt
Browse files

added a function to remove record links

parent 3f8d7ef6
Branches
No related merge requests found
Pipeline #58468 passed with stages
in 1 minute and 39 seconds
......@@ -143,3 +143,16 @@ def connect_likwid_files(records):
logger.info(f"Linking {p_log.id} with {likwid_log[0].id}")
logger.info(f"Linking {p_log.meta['title']} with {likwid_log[0].meta['title']}")
likwid_log[0].link_record(p_log.id, "hardware performance counter")
def get_record_links(record):
return record.get_record_links()
def remove_records_links_by_name(records, name):
for record in records:
links = get_record_links(record).json()
for link in links['items']:
if link['name'] == name:
logger.info(f"Removing link {link['id']}")
record.delete_record_link(link['id'])
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment