You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The notification verb is saved in the database. Thus, changing the verb in the NOTIFICATION_TYPE does not change the message of existing notifications.
Steps To Reproduce
Steps to reproduce the behavior:
Hey @pandafy, I think the solution approach is to make the verb field nullable, by updating the handler to make verb optional, and add a get_verb() method that prioritizes NOTIFICATION_TYPES config while falling back to the database value, with checking.. notifications properly reflect updated verbs while maintaining backward compatibility can solve this bug
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: