nicolewhite / neo4j-flask

Flaskr Extended with Neo4j and Py2neo.
http://nicolewhite.github.io/neo4j-flask/
312 stars 114 forks source link

Change syntax of "next" in get_commonality_of_user for py2neo v4 #24

Open seanofahey opened 5 years ago

seanofahey commented 5 years ago

First thanks for the code and tutorial -- they are both very helpful.

Issue:

Potential Cause:

return graph.run(query, they=other.username, you=self.username).next

Fix: Modify the return call to be: return graph.run(query, they=other.username, you=self.username).next()

or wrap it with: return next(graph.run(query, they=other.username, you=self.username))