Skip to content

Commit

Permalink
[Fixes #12596] User with notification disabled still receive the noti… (
Browse files Browse the repository at this point in the history
#12597)

* [Fixes #12596] User with notification disabled still receive the notifications

* [Fixes #12596] User with notification disabled still receive the notifications
  • Loading branch information
mattiagiupponi authored Sep 20, 2024
1 parent 5bcbd82 commit 3973941
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 3973941

Please sign in to comment.