We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f01a4c commit 571608bCopy full SHA for 571608b
backend/PyMatcha/utils/tasks.py
@@ -48,6 +48,8 @@ def update_heat_scores():
48
score -= reports_received * REPORTS_MULTIPLIER
49
score += views * VIEW_MULTIPLIER
50
score += ceil(messages / MESSAGES_DIVIDER)
51
+ if score < 0:
52
+ score = 0
53
user.heat_score = score
54
user.save()
55
return f"Updated heat score for user {user.id}: {user.heat_score}."
0 commit comments