Don't event first_name and last_name.

TNL-2044
This commit is contained in:
cahrens
2015-04-21 16:03:59 -04:00
parent d50ed75f36
commit 4af79d6f76
2 changed files with 10 additions and 1 deletions

View File

@@ -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']
)

View File

@@ -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()