From 1b80ece9e8d56b229bc6b7d116bd694d2abbeb08 Mon Sep 17 00:00:00 2001 From: Ethan Soergel Date: Thu, 30 Nov 2023 15:39:16 -0500 Subject: [PATCH] Lazily fetch django user only on first load --- corehq/apps/users/user_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/corehq/apps/users/user_data.py b/corehq/apps/users/user_data.py index cca7f1699f3c..6a5dbe26d64c 100644 --- a/corehq/apps/users/user_data.py +++ b/corehq/apps/users/user_data.py @@ -34,7 +34,7 @@ def lazy_init(cls, couch_user, domain): domain=domain, defaults={ 'data': raw_user_data, - 'django_user': couch_user.get_django_user(), + 'django_user': couch_user.get_django_user, 'profile_id': profile_id, } ) @@ -46,7 +46,7 @@ def save(self): domain=self.domain, defaults={ 'data': self._local_to_user, - 'django_user': self._couch_user.get_django_user(), + 'django_user': self._couch_user.get_django_user, 'profile_id': self.profile_id, }, )