Commit 4af79d6f by cahrens

Don't event first_name and last_name.

TNL-2044
parent d50ed75f
......@@ -374,7 +374,7 @@ def user_post_save_callback(sender, **kwargs):
user,
user,
sender._meta.db_table,
excluded_fields=['last_login'],
excluded_fields=['last_login', 'first_name', 'last_name'],
hidden_fields=['password']
)
......
......@@ -146,3 +146,12 @@ class TestUserEvents(UserSettingsEventTestMixin, TestCase):
with self.assertRaises(IntegrityError):
self.user.save()
self.assert_no_events_were_emitted()
def test_no_first_and_last_name_events(self):
"""
Verify that first_name and last_name events are not emitted.
"""
self.user.first_name = "Donald"
self.user.last_name = "Duck"
self.user.save()
self.assert_no_events_were_emitted()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment