forked from rDrama/rDrama
fix awards receieved for house awards
parent
e5da38d19c
commit
c42ff2788e
|
@ -541,11 +541,12 @@ class User(Base):
|
||||||
total_awards = post_awards + comment_awards
|
total_awards = post_awards + comment_awards
|
||||||
|
|
||||||
for a in total_awards:
|
for a in total_awards:
|
||||||
if a.kind in awards:
|
kind = a.kind.replace(' Founder', '')
|
||||||
awards[a.kind]['count'] += 1
|
if kind in awards:
|
||||||
|
awards[kind]['count'] += 1
|
||||||
else:
|
else:
|
||||||
awards[a.kind] = a.type
|
awards[kind] = a.type
|
||||||
awards[a.kind]['count'] = 1
|
awards[kind]['count'] = 1
|
||||||
|
|
||||||
return sorted(list(awards.values()), key=lambda x: x['kind'], reverse=True)
|
return sorted(list(awards.values()), key=lambda x: x['kind'], reverse=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue