neo4j-flask
neo4j-flask copied to clipboard
Change syntax of "next" in get_commonality_of_user for py2neo v4
First thanks for the code and tutorial -- they are both very helpful.
Issue:
- When logged in as a user and looking at the profile page of another user, the system does not correctly display the number of likes or the common tags.
Potential Cause:
- the return call on the get_commonality_of_user method in models.py uses the following syntax:
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))