Skip to content
Snippets Groups Projects
Commit 8c3c38ea authored by AndiMajore's avatar AndiMajore
Browse files

small hotfix for unmappable compact notation nodes

Former-commit-id: d708bf98b43b750fef81e64457d4dd3edd048899 [formerly 4ff82f6a4f8b181bcb66b96b9f0081946ad57998]
Former-commit-id: f377cbec079ed3d7058912b416482f1bd662a9b6
parent f20a7a4b
No related branches found
No related tags found
No related merge requests found
......@@ -189,7 +189,14 @@ def map_nodes(request) -> Response:
nodes_mapped, id_key = query_proteins_by_identifier(node_ids, identifier)
# change data structure to dict in order to be quicker when merging
nodes_mapped_dict = {id.upper(): node for node in nodes_mapped for id in node[id_key]}
nodes_mapped_dict = {}
for node in nodes_mapped:
if id_key in node:
for id in node[id_key]:
nodes_mapped_dict[id.upper()] = node
# TODO find solution if target id space is empty
# else:
# nodes_mapped_dict[node['id'].upper()] = node
# merge fetched data with given data to avoid data loss
for node in nodes:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment