fix 500 error

pull/225/head
Aevann 2024-03-09 20:50:26 +02:00
parent 43f7f9f070
commit 51bf7fbc97
1 changed files with 2 additions and 0 deletions

View File

@ -99,6 +99,8 @@ 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)
if existing: continue
n = Notification(comment_id=target.id, user_id=id)
g.db.add(n)