Skip to content

Commit 99d5864

Browse files
committed
Relationship class compatibility fix
1 parent 7a08d51 commit 99d5864

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

neo4j/v1/types.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,6 @@ def hydrate(cls, id_, start, end, type, properties=None):
211211
return inst
212212

213213
def __init__(self, start, end, type, properties=None, **kwproperties):
214-
assert isinstance(start, int)
215-
assert isinstance(end, int)
216214
super(Relationship, self).__init__(type, properties, **kwproperties)
217215
self.start = start
218216
self.end = end
@@ -221,6 +219,10 @@ def __repr__(self):
221219
return "<Relationship id=%r start=%r end=%r type=%r properties=%r>" % \
222220
(self.id, self.start, self.end, self.type, self.properties)
223221

222+
@property
223+
def nodes(self):
224+
return self.start, self.end
225+
224226

225227
class UnboundRelationship(BaseRelationship):
226228
""" Self-contained graph relationship without endpoints.

0 commit comments

Comments
 (0)