Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only update `last_login` instead of the whole user object in `update_…

…last_login`.
  • Loading branch information...
commit d21f3d9b171a3cbff4c8ce7a9dbb8b8be3f21bac 1 parent a630d08
@apollo13 apollo13 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/auth/models.py
View
2  django/contrib/auth/models.py
@@ -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)

0 comments on commit d21f3d9

Please sign in to comment.
Something went wrong with that request. Please try again.