From f5b07ad003c21618741f9280e96ce02643b20456 Mon Sep 17 00:00:00 2001 From: Yan Date: Fri, 12 Jan 2024 18:47:24 -0700 Subject: [PATCH] i'm tired of missing the motherfucking flags on the motherfucking scoreboard --- dojo_plugin/api/v1/scoreboard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dojo_plugin/api/v1/scoreboard.py b/dojo_plugin/api/v1/scoreboard.py index af3b9236c..59eaa72b0 100644 --- a/dojo_plugin/api/v1/scoreboard.py +++ b/dojo_plugin/api/v1/scoreboard.py @@ -95,6 +95,7 @@ def hook_object_update(mapper, connection, target): invalidate_scoreboard_cache() def get_scoreboard_page(model, duration=None, page=1, per_page=20): + belt_data = get_belts() results = get_scoreboard_for(model, duration) start_idx = (page - 1) * per_page @@ -107,7 +108,7 @@ def standing(item): result = {key: item[key] for key in item.keys()} result["url"] = url_for("pwncollege_users.view_other", user_id=result["user_id"]) result["symbol"] = email_symbol_asset(result.pop("email")) - result["belt"] = belt_asset(None) # TODO + result["belt"] = belt_asset(belt_data["users"].get(result["user_id"], {"color":None})["color"]) result["badges"] = [] # TODO return result