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:
parent
a630d08483
commit
d21f3d9b17
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user