From 09c3ac2b65d917e6aac4725e2fefe8b35d6e7f27 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Fri, 28 Oct 2022 01:25:18 -0500 Subject: [PATCH] jinja2 doesn't has getattr but we can subscript apparently weird but ok --- files/templates/leaderboard.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/templates/leaderboard.html b/files/templates/leaderboard.html index 89062a4cc..62b2e5bae 100644 --- a/files/templates/leaderboard.html +++ b/files/templates/leaderboard.html @@ -48,10 +48,10 @@ {% if v.id == user.id %} {% set style="class=\"self\"" %} {% endif %} - {{format_user_in_table(user, style, loop.index, getattr(user, attr_name))}} + {{format_user_in_table(user, style, loop.index, user[attr_name])}} {% endfor %} {% if position %} - {{format_user_in_table(v, "style=\"border-top:2px solid var(--primary)\"", position, getattr(v, attr_name))}} + {{format_user_in_table(v, "style=\"border-top:2px solid var(--primary)\"", position, v[attr_name])}} {% endif %}