0
0
mirror of https://github.com/django/django.git synced 2024-11-30 07:06:18 +01:00

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

View File

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