This commit is contained in:
Aevann1 2021-08-06 14:47:25 +02:00
parent effafc8288
commit d2b77cba16
3 changed files with 5 additions and 5 deletions

View file

@ -135,7 +135,7 @@ class User(Base, Stndrd, Age_times):
@property
@lazy
def referral_count(self):
return self.referrals.count()
return len(self.referrals)
def has_block(self, target):
@ -196,7 +196,7 @@ class User(Base, Stndrd, Age_times):
elif sort == "bottom":
submissions = sorted(submissions.all(), key=lambda x: x.score)
elif sort == "comments":
submissions = submissions.order_by(Submission.comment_count.desc()).all()
submissions = sorted(submissions.all(), key=lambda x: x.comment_count, reverse=True)
firstrange = 25 * (page - 1)
secondrange = firstrange + 26