forked from rDrama/rDrama
fix 500 error
parent
4b872e5ffe
commit
ab580f626f
|
@ -651,6 +651,10 @@ class User(Base):
|
|||
)
|
||||
if self.id == AEVANN_ID:
|
||||
q = q.filter(ModAction.kind.in_(('ban_user','shadowban')))
|
||||
|
||||
if self.admin_level < PERMS['PROGSTACK']:
|
||||
actions = actions.filter(ModAction.kind.notin_(MODACTION_PRIVILEGED__TYPES))
|
||||
|
||||
return q.count()
|
||||
|
||||
if self.moderated_subs:
|
||||
|
|
|
@ -199,6 +199,9 @@ def notifications_modactions(v:User):
|
|||
if v.id == AEVANN_ID and SITE_NAME == 'rDrama':
|
||||
listing = listing.filter(cls.kind.in_(('ban_user','unban_user','shadowban','unshadowban')))
|
||||
|
||||
if v.admin_level < PERMS['PROGSTACK']:
|
||||
actions = actions.filter(ModAction.kind.notin_(MODACTION_PRIVILEGED__TYPES))
|
||||
|
||||
if cls == SubAction:
|
||||
listing = listing.filter(cls.sub.in_(v.moderated_subs))
|
||||
|
||||
|
|
Loading…
Reference in New Issue