diff --git a/files/routes/users.py b/files/routes/users.py index c90fc2dd2..3ee41a2b9 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -996,8 +996,8 @@ def u_username(username, v=None): # this is probably totalllly inefficient but maybe someone can fix it later total_num_of_hats = g.db.query(HatDef).filter(HatDef.submitter_id == None).count() - owned_hats = len(u.owned_hats) - owned_hats_pct = f'{owned_hats / total_num_of_hats:.0%}' + owned_hats = u.num_of_owned_hats + owned_hats_pct = f'{float(owned_hats) / total_num_of_hats:.0%}' if u.unban_utc: if request.headers.get("Authorization") or request.path.endswith(".json"):