sfd
This commit is contained in:
parent
82d77d9c14
commit
651a9e00bf
2 changed files with 9 additions and 0 deletions
|
@ -12,6 +12,7 @@ from .subscriptions import *
|
|||
from .userblock import *
|
||||
from .badges import *
|
||||
from .clients import *
|
||||
from .mod_logs import *
|
||||
from files.__main__ import Base, cache
|
||||
from files.helpers.security import *
|
||||
import random
|
||||
|
@ -363,6 +364,12 @@ class User(Base):
|
|||
|
||||
return sorted(list(awards.values()), key=lambda x: x['kind'], reverse=True)
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def modaction_num(self):
|
||||
if self.admin_level < 2: return 0
|
||||
return g.db.query(ModAction.id).filter_by(user_id=self.id).count()
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def notifications_count(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue