Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 4.4.x] [Fixes #12596] User with notification disabled still receive the noti… #12598

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions geonode/notifications_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ def get_notification_recipients(notice_type_label, exclude_user=None, resource=N
"""Get notification recipients"""
if not has_notifications:
return []
recipients_ids = notifications.models.NoticeSetting.objects.filter(notice_type__label=notice_type_label).values(
"user"
)
recipients_ids = notifications.models.NoticeSetting.objects.filter(
notice_type__label=notice_type_label, send=True
).values("user")

profiles = get_user_model().objects.filter(id__in=recipients_ids)
exclude_users_ids = []
Expand Down
Loading