From bd2e58aea99a8f16dac5a349d2d778f629833911 Mon Sep 17 00:00:00 2001 From: donhluca Date: Wed, 27 May 2026 16:57:01 +0700 Subject: [PATCH] fix: pass username strings instead of Dojo_User objects to create_notification in process_tag_notifications process_tag_notifications() was building a list of Dojo_User objects and passing them as recipients to create_notification(). However, _process_recipients() filters Notifications using user__username__in=kwargs['recipients'], which expects username strings. Passing objects caused the queryset to return zero results, silently dropping all user_mentioned notifications (alert, Slack, email, etc.) regardless of notification settings. Fix: return username strings from the list comprehension instead of Dojo_User objects. Fixes #14923 --- dojo/notifications/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dojo/notifications/helper.py b/dojo/notifications/helper.py index 0563912d203..65f6b9b24df 100644 --- a/dojo/notifications/helper.py +++ b/dojo/notifications/helper.py @@ -894,7 +894,7 @@ def process_tag_notifications(request, note, parent_url, parent_title): usernames_to_check = set(un.lower() for un in regex.findall(note.entry)) # noqa: C401 users_to_notify = [ - Dojo_User.objects.filter(username=username).get() + username for username in usernames_to_check if Dojo_User.objects.filter(is_active=True, username=username).exists() ]