From 57af16a886b4d5bd61c3b3aff26e050771ce050c Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 16 Mar 2024 10:21:23 +0200 Subject: [PATCH] fix bad code --- files/helpers/sanitize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index f5e51d204..694495294 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -96,7 +96,7 @@ def execute_blackjack(v, target, body, kind): extra_info = f"reports on {target.permalink}" elif kind in {'comment', 'message'}: for id in notified_ids: - existing = g.db.query(Notification).filter_by(comment_id=target.id, user_id=id) + existing = g.db.query(Notification).filter_by(comment_id=target.id, user_id=id).one_or_none() if existing: continue n = Notification(comment_id=target.id, user_id=id) g.db.add(n)