remove redundant condition

pull/134/head
Aevann 2023-02-26 11:14:39 +02:00
parent 4d6ffc3667
commit 890fedf1f3
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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']: