diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-11-08 14:36:56 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-11-08 14:39:50 +0100 |
commit | 2883733d294d86541a7f9253d0f8bc3ff56ff8c9 (patch) | |
tree | 0a54f029a0a265ee864aac9b10324d191ece50a5 /ishtar_common | |
parent | fe8275b4ff08a1e815c9cde6509fa466e148346e (diff) | |
download | Ishtar-2883733d294d86541a7f9253d0f8bc3ff56ff8c9.tar.bz2 Ishtar-2883733d294d86541a7f9253d0f8bc3ff56ff8c9.zip |
🐛 Password expiration: delete cache after password reset
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 2a60bfd6a..2ab7e970d 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -203,8 +203,8 @@ def update_password_last_update(user): return ishtar_user.password_last_update = datetime.date.today() ishtar_user.save() - key = f"{settings.PROJECT_SLUG}-password_expired-{ishtar_user.pk}" - cache.set(key, False, settings.CACHE_TIMEOUT) + key = f"{settings.PROJECT_SLUG}-password_expired-{user.pk}" + cache.delete(key) class PasswordChangeView(auth_view.PasswordChangeView): |