-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
[bug] User receives multiple identical notifications #277
Comments
kkreitmair
added a commit
to kkreitmair/openwisp-notifications
that referenced
this issue
Jun 4, 2024
If a user is in several organizations, they will receive multiple identical notifications. The reason for this is that the database query, which determines which user should receive the notification, does a LEFT OUTER JOIN with the "openwisp_users_organizationuser" table. In this table, a user is multiple times listed, when he is in several organizations. Therefore the query returns such a user multiple times, which will then receive multiple identical notifications. This commit fixes this bug by adding a distinct to all user queries. Fixes openwisp#277 Signed-off-by: Konrad Kreitmair <kkreitmair@tdt.de>
kkreitmair
added a commit
to kkreitmair/openwisp-notifications
that referenced
this issue
Jun 4, 2024
If a user is in several organizations, they will receive multiple identical notifications. The reason for this is that the database query, which determines which user should receive the notification, does a LEFT OUTER JOIN with the "openwisp_users_organizationuser" table. In this table, a user is multiple times listed, when he is in several organizations. Therefore the query returns such a user multiple times, which will then receive multiple identical notifications. This commit fixes this bug by adding a distinct to all user queries. Fixes openwisp#277 Signed-off-by: Konrad Kreitmair <kkreitmair@tdt.de>
kkreitmair
added a commit
to kkreitmair/openwisp-notifications
that referenced
this issue
Jun 11, 2024
…penwisp#277 This should prevent regression to the behavior of the related issue. Related to openwisp#277 Signed-off-by: Konrad Kreitmair <kkreitmair@tdt.de>
kkreitmair
added a commit
to kkreitmair/openwisp-notifications
that referenced
this issue
Jun 11, 2024
If a user is in several organizations, they will receive multiple identical notifications. The reason for this is that the database query, which determines which user should receive the notification, does a LEFT OUTER JOIN with the "openwisp_users_organizationuser" table. In this table, a user is multiple times listed, when he is in several organizations. Therefore the query returns such a user multiple times, which will then receive multiple identical notifications. This commit fixes this bug by adding a distinct to all user queries. Fixes openwisp#277 Signed-off-by: Konrad Kreitmair <kkreitmair@tdt.de>
kkreitmair
added a commit
to kkreitmair/openwisp-notifications
that referenced
this issue
Jun 11, 2024
…penwisp#277 This should prevent regression to the behavior of the related issue. Related to openwisp#277 Signed-off-by: Konrad Kreitmair <kkreitmair@tdt.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If a user is in several organizations,
they will receive multiple identical notifications.
The reason for this is that the database query, which determines which user should receive the notification, can return a user multiple times.
Steps to replicate the issue:
272
inopenwisp_controller/config/apps.py
.is_admin
is not required).default
, web notification checked and email notification checked.env/bin/python tests/manage.py create_notification
The text was updated successfully, but these errors were encountered: