remotes/1693045480750635534/spooky-22
Aevann1 2021-09-23 01:52:18 +02:00
parent e0dfa39460
commit 739f873fff
1 changed files with 2 additions and 6 deletions

View File

@ -18,7 +18,7 @@ class CommentAux(Base):
key_id = Column(Integer, primary_key=True)
id = Column(Integer, ForeignKey("comments.id"))
body = Column(String(10000))
body = Column(String(10000), default=None)
body_html = Column(String(20000))
ban_reason = Column(String(256), default='')
@ -28,7 +28,7 @@ class Comment(Base):
__tablename__ = "comments"
id = Column(Integer, primary_key=True)
comment_aux = relationship("CommentAux", uselist=False, primaryjoin="Comment.id==CommentAux.id")
comment_aux = relationship("CommentAux", lazy="joined", uselist=False, innerjoin=True, primaryjoin="Comment.id==CommentAux.id")
author_id = Column(Integer, ForeignKey("users.id"))
parent_submission = Column(Integer, ForeignKey("submissions.id"))
created_utc = Column(Integer, default=0)
@ -349,10 +349,6 @@ class Comment(Base):
self.comment_aux.ban_reason = x
g.db.add(self.comment_aux)
#@property
#def award_count(self):
#return len(self.awards)
@lazy
def collapse_for_user(self, v):