-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
Query:
MATCH (person:Person {id: 1})
OPTIONAL MATCH (person)-[:OWNS]->(product:Product)
RETURN person, product
Execute Query
with graph.transaction(commit=False) as tx:
results = graph.query(q, returns=(client.Node, client.Node, ))
Exception
If I execute the Query and it has the optional match, no exception. If the optional match returns None I get:
File "/usr/local/lib/python3.5/site-packages/neo4jrestclient/query.py", line 829, in __exit__
self.commit()
File "/usr/local/lib/python3.5/site-packages/neo4jrestclient/query.py", line 948, in commit
results = self._execute(url, results=True)
File "/usr/local/lib/python3.5/site-packages/neo4jrestclient/query.py", line 868, in _execute
_results = self._update(content["results"])
File "/usr/local/lib/python3.5/site-packages/neo4jrestclient/query.py", line 891, in _update
obj, elements=result["data"], returns=returns
File "/usr/local/lib/python3.5/site-packages/neo4jrestclient/query.py", line 792, in cast
casted_row.append(cast_element(element, func))
File "/usr/local/lib/python3.5/site-packages/neo4jrestclient/query.py", line 714, in cast_element
obj = func(element["self"], update_dict=element,
TypeError: 'NoneType' object is not subscriptable
Metadata
Metadata
Assignees
Labels
No labels