Browse Source

Comment: Fix parent_comment relationship

merge-requests/22/head
Deimos 6 years ago
parent
commit
4f0075966d
  1. 3
      tildes/tildes/models/comment/comment.py

3
tildes/tildes/models/comment/comment.py

@ -97,7 +97,8 @@ class Comment(DatabaseModel):
user: User = relationship('User', lazy=False, innerjoin=True)
topic: Topic = relationship('Topic', innerjoin=True)
parent_comment: 'Comment' = relationship('Comment', innerjoin=True)
parent_comment: Optional['Comment'] = relationship(
'Comment', uselist=False, remote_side=[comment_id])
@hybrid_property
def markdown(self) -> str:

Loading…
Cancel
Save