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