This commit is contained in:
Aevann1 2021-07-27 02:23:41 +02:00
parent 33cb79fbc8
commit 97e9d0ff64
3 changed files with 30 additions and 5 deletions

View file

@ -328,13 +328,11 @@ class User(Base, Stndrd, Age_times):
@property
@lazy
def post_count(self):
return self.submissions.filter_by(is_banned=False, deleted_utc=0).count()
@property
@lazy
def comment_count(self):
return self.comments.filter(Comment.parent_submission != None).filter_by(is_banned=False, deleted_utc=0).count()
@property