From c00db58cb189179c2f6bf37b9ecbc0232c8f4ccb Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Tue, 9 Jul 2024 00:08:25 -0500 Subject: [PATCH] Temp fix for cache bug --- judge/models/profile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/judge/models/profile.py b/judge/models/profile.py index 283373b..02a87bd 100644 --- a/judge/models/profile.py +++ b/judge/models/profile.py @@ -274,7 +274,10 @@ class Profile(models.Model): @cached_property def username(self): - return self._cached_info["username"] + try: + return self._cached_info["username"] + except KeyError: + _get_basic_info.dirty(self.id) @cached_property def first_name(self):