sneed
This commit is contained in:
parent
0195b174e4
commit
a88b14488b
2 changed files with 24 additions and 5 deletions
|
@ -295,6 +295,21 @@ class User(Base, Stndrd, Age_times):
|
|||
|
||||
return f"Unban in {text}"
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def display_awards(self):
|
||||
|
||||
_awards = {}
|
||||
|
||||
for a in self.awards:
|
||||
if a.kind in _awards:
|
||||
_awards[a.kind]['count'] += 1
|
||||
else:
|
||||
_awards[a.kind] = a.type
|
||||
_awards[a.kind]['count'] = 1
|
||||
|
||||
return list(_awards.values())
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def post_notifications_count(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue