forked from MarseyWorld/MarseyWorld
master
parent
fc70de6fc0
commit
e2fa0ecb76
|
@ -51,7 +51,7 @@ class Comment(Base, Age_times, Scores, Stndrd, Fuzzing):
|
|||
oauth_app=relationship("OauthApp")
|
||||
|
||||
post = relationship("Submission")
|
||||
flags = relationship("CommentFlag", lazy="dynamic")
|
||||
flags = relationship("CommentFlag", lazy="joined")
|
||||
votes = relationship(
|
||||
"CommentVote",
|
||||
lazy="dynamic",
|
||||
|
@ -293,7 +293,7 @@ class Comment(Base, Age_times, Scores, Stndrd, Fuzzing):
|
|||
|
||||
@property
|
||||
@lazy
|
||||
def active_flags(self): return self.flags.count()
|
||||
def active_flags(self): return len(self.flags)
|
||||
|
||||
@property
|
||||
@lazy
|
||||
|
|
|
@ -54,7 +54,7 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing):
|
|||
lazy="joined",
|
||||
primaryjoin="Comment.parent_submission==Submission.id",
|
||||
)
|
||||
flags = relationship("Flag", lazy="dynamic")
|
||||
flags = relationship("Flag", lazy="joined")
|
||||
is_approved = Column(Integer, ForeignKey("users.id"), default=0)
|
||||
over_18 = Column(Boolean, default=False)
|
||||
author = relationship(
|
||||
|
@ -415,7 +415,7 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing):
|
|||
|
||||
@property
|
||||
@lazy
|
||||
def active_flags(self): return self.flags.count()
|
||||
def active_flags(self): return len(self.flags)
|
||||
|
||||
@property
|
||||
@lazy
|
||||
|
|
Loading…
Reference in New Issue