From 37af363a475b4ac334c1f59f72e115212c1dbd1d Mon Sep 17 00:00:00 2001 From: justcool393 Date: Thu, 20 Oct 2022 19:31:03 -0500 Subject: [PATCH] remove duplicate message --- files/helpers/actions.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 018f4b591..af194d38f 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -364,10 +364,9 @@ def execute_blackjack(v, target, body, type): if not v.is_banned: v.ban_reason = f"Blackjack" g.db.add(v) notif = None - extra_info = None + extra_info = "unknown entity" if type == 'submission': extra_info = f"submission ({target.permalink})" - send_repeatable_notification(CARP_ID, target.permalink) elif type == 'comment' or type == 'message': extra_info = f"{type} ({target.permalink})" notif = Notification(comment_id=target.id, user_id=CARP_ID) @@ -375,8 +374,7 @@ def execute_blackjack(v, target, body, type): extra_info = "chat message" elif type == 'flag': extra_info = f"reports on {target.permalink}" - else: - extra_info = "unknown entity" + if notif: g.db.add(notif) g.db.flush()