fix awards receieved for house awards

remotes/1693045480750635534/spooky-22
Aevann1 2022-09-19 01:10:00 +02:00
parent e5da38d19c
commit c42ff2788e
1 changed files with 5 additions and 4 deletions

View File

@ -541,11 +541,12 @@ class User(Base):
total_awards = post_awards + comment_awards
for a in total_awards:
if a.kind in awards:
awards[a.kind]['count'] += 1
kind = a.kind.replace(' Founder', '')
if kind in awards:
awards[kind]['count'] += 1
else:
awards[a.kind] = a.type
awards[a.kind]['count'] = 1
awards[kind] = a.type
awards[kind]['count'] = 1
return sorted(list(awards.values()), key=lambda x: x['kind'], reverse=True)