dsdsd
parent
975c2255d1
commit
767f65d524
|
@ -32,7 +32,6 @@ class Comment(Base, Age_times, Scores, Stndrd, Fuzzing):
|
|||
parent_submission = Column(Integer, ForeignKey("submissions.id"))
|
||||
# this column is foreignkeyed to comment(id) but we can't do that yet as
|
||||
# "comment" class isn't yet defined
|
||||
parent_fullname = Column(Integer)
|
||||
created_utc = Column(Integer, default=0)
|
||||
edited_utc = Column(Integer, default=0)
|
||||
is_banned = Column(Boolean, default=False)
|
||||
|
@ -111,6 +110,13 @@ class Comment(Base, Age_times, Scores, Stndrd, Fuzzing):
|
|||
|
||||
else: return g.db.query(Comment).get(self.parent_comment_id)
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def parent_fullname(self):
|
||||
if self.parent_comment_id: return "t3_" + self.parent_comment_id
|
||||
elif self.parent_submission: return "t2_" + self.parent_submission
|
||||
|
||||
|
||||
@property
|
||||
def replies(self):
|
||||
|
||||
|
|
Loading…
Reference in New Issue