forked from MarseyWorld/MarseyWorld
remove redundant condition
parent
4d6ffc3667
commit
890fedf1f3
|
@ -594,7 +594,7 @@ class User(Base):
|
|||
.filter(
|
||||
Notification.read == False,
|
||||
Notification.user_id == self.id,
|
||||
not_(and_(Comment.sentto != None, Comment.sentto == MODMAIL_ID, User.is_muted)),
|
||||
not_(and_(Comment.sentto == MODMAIL_ID, User.is_muted)),
|
||||
))
|
||||
|
||||
if not self.can_see_shadowbanned:
|
||||
|
|
|
@ -298,7 +298,7 @@ def notifications(v:User):
|
|||
comments = g.db.query(Comment, Notification).join(Notification.comment).join(Comment.author).filter(
|
||||
Notification.user_id == v.id,
|
||||
or_(Comment.sentto == None, Comment.sentto == MODMAIL_ID),
|
||||
not_(and_(Comment.sentto != None, Comment.sentto == MODMAIL_ID, User.is_muted)),
|
||||
not_(and_(Comment.sentto == MODMAIL_ID, User.is_muted)),
|
||||
)
|
||||
|
||||
if v.admin_level < PERMS['USER_SHADOWBAN']:
|
||||
|
|
Loading…
Reference in New Issue