mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 20:45:44 +00:00
Fix email notification setting (#3832)
* Coerce setting value to a boolean * Ignore inactive users when sending notification emails * Only send UI notifications to active users * Fixes for unit tests
This commit is contained in:
@ -557,11 +557,13 @@ class BuildTest(BuildTestBase):
|
||||
category='build.new_build',
|
||||
)
|
||||
|
||||
self.assertEqual(messages.count(), 2)
|
||||
self.assertEqual(messages.count(), 1)
|
||||
|
||||
self.assertFalse(messages.filter(user__pk=2).exists())
|
||||
|
||||
self.assertTrue(messages.filter(user__pk=3).exists())
|
||||
# Inactive users do not receive notifications
|
||||
self.assertFalse(messages.filter(user__pk=3).exists())
|
||||
|
||||
self.assertTrue(messages.filter(user__pk=4).exists())
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user