mirror of
https://github.com/django/django.git
synced 2025-06-02 18:19:11 +00: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.
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user