-
-
Notifications
You must be signed in to change notification settings - Fork 55
[bug] Notification verb is saved in database #334
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
Labels
Comments
Hey @pandafy, I think the solution approach is to make the can I give it a try ? |
4 tasks
stktyagi
added a commit
to stktyagi/openwisp-notifications
that referenced
this issue
May 17, 2025
The notification verb was saved in the database, causing existing notifications to not reflect updates to the verb. Now the verb is not saved, so messages show the current verb dynamically. Fixes openwisp#334
stktyagi
added a commit
to stktyagi/openwisp-notifications
that referenced
this issue
May 18, 2025
…wisp#334 The notification verb was previously saved in the database, preventing existing notifications from reflecting verb updates. Now the verb is calculated dynamically via a property, ensuring messages always show the current verb. Fixes openwisp#334
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The notification
verb
is saved in the database. Thus, changing theverb
in theNOTIFICATION_TYPE
does not change the message of existing notifications.Steps To Reproduce
Steps to reproduce the behavior:
create_notification
management command.openwisp-notifications/openwisp_notifications/types.py
Lines 7 to 19 in 55a3443
Expected behavior
The notification message should show the updated notification verb
Possible solution
Update the notify handler to not save the verb in the database.
openwisp-notifications/openwisp_notifications/handlers.py
Lines 139 to 148 in 55a3443
Update the AbstractNotification model to use the
verb
from the configuration if database value is set to NoneThe text was updated successfully, but these errors were encountered: