num hats fix (and pct fix too?)
parent
4baf7cfa42
commit
360723f761
|
@ -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"):
|
||||
|
|
Loading…
Reference in New Issue