-
-
Notifications
You must be signed in to change notification settings - Fork 58
[fix] Dynamically updating notification verb #334 #413
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
base: master
Are you sure you want to change the base?
Conversation
Made verb field in notification nullable. Created a property verb under AbstractNotification in models that prioritizes verb from NOTIFICATION_TYPES and uses DB as a fallback. Fixes openwisp#334
Same as above Fixes openwisp#334.
I think the CI builds are failing because the ./manage.py makemigrations isn't being run in the workflow, the migration I added solved the issue of the NOT NULL constraint on verb when I tested locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pranshustuff.
We need a test which replicates the bug described in #334. The test should fail without your patch and should pass with it.
Please also make sure the CI build passes.
See more comments below.
Added a test to verify correct behaviour and specified exceptions in the try-except in the verb property in models.py Fixes openwisp#334
I've made the requested changes. |
It should pass CI bulds now I think. Fixes openwisp#334
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests and QA checks are failing, the developer docs of OpenWISP RADIUS explain how to run tests and QA checks.
This reverts commit 5b8f80b.
Removed verb field from DB, verb now updates from config from NOTIFICATION_TYPES. Fixes openwisp#334
Ok locally, it passed the tests, on sample app too. I added a test that mimics the bug in test_notifications.py. |
Checklist
Reference to Existing Issue
Fixes #334.
Description of Changes
Screenshot
simplescreenrecorder-2025-10-01_15.25.40.mp4