Fix leaderboard 500 on production (NotImplementedError) (#563)
* leaderboard: correct LB set when !ENABLE_SERVICES * leaderboard: fix NotImplementedError UserBlockLeaderboard did not, in fact, implement `value_func`. Nor did its superclass. The bug was replicated by having at least one UserBlock in the test data.
This commit is contained in:
parent
1f7e7afad3
commit
1cf017c42a
3 changed files with 11 additions and 2 deletions
|
@ -382,7 +382,9 @@ def leaderboard(v:User):
|
|||
|
||||
# note: lb_downvotes_received and lb_upvotes_given are global variables
|
||||
# that are populated by leaderboard_thread() in files.helpers.services
|
||||
leaderboards = [coins, coins_spent, truescore, subscribers, posts, comments, received_awards, badges, blocks, lb_downvotes_received, lb_upvotes_given]
|
||||
leaderboards = [coins, coins_spent, truescore, subscribers, posts, comments, received_awards, badges, blocks]
|
||||
if lb_downvotes_received is not None and lb_upvotes_given is not None:
|
||||
leaderboards.extend([lb_downvotes_received, lb_upvotes_given])
|
||||
|
||||
return render_template("leaderboard.html", v=v, leaderboards=leaderboards)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue