Skip to content

Commit

Permalink
fixing bug for edges without ids
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanDietzMorris committed Aug 1, 2024
1 parent e09f5e5 commit 0ba22a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions reasoner_transpiler/cypher.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ def transform_result(cypher_result,
continue
result_edges = convert_bolt_edge_to_dict(cypher_record[qedge_id]) if bolt_protocol \
else convert_jolt_edge_to_dict(cypher_record[qedge_id], jolt_element_id_lookup)
# print(result_edge)
if qedge.get('_return', True):
for result_edge in result_edges:
graph_edge_id = result_edge['id']
Expand Down Expand Up @@ -536,7 +535,7 @@ def convert_bolt_edge_to_dict(bolt_edge):
'predicate': bolt_edge.type,
'object': bolt_edge.end_node.get('id')}) # add the SPO from the other properties of the bolt response list
if 'id' not in edge:
edge['element_id'] = bolt_edge.element_id # if the edge didn't have an "id" use the neo4j element id
edge['id'] = bolt_edge.element_id # if the edge didn't have an "id" use the neo4j element id
converted_edges.append(edge)
return converted_edges

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name="reasoner-transpiler",
version="2.2.1",
version="2.2.2",
author="Patrick Wang",
author_email="[email protected]",
maintainer="Evan Morris",
Expand Down

0 comments on commit 0ba22a3

Please sign in to comment.