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…
Reference in New Issue