Only update `last_login` instead of the whole user object in `update_last_login`.

This commit is contained in:
Florian Apolloner 2012-09-17 19:52:22 +02:00
parent a630d08483
commit d21f3d9b17
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ def update_last_login(sender, user, **kwargs):
the user logging in. the user logging in.
""" """
user.last_login = timezone.now() user.last_login = timezone.now()
user.save() user.save(update_fields=['last_login'])
user_logged_in.connect(update_last_login) user_logged_in.connect(update_last_login)