Ticket #4196: user_get_profile.diff
File user_get_profile.diff, 745 bytes (added by , 18 years ago) |
---|
-
django/contrib/auth/models.py
257 257 try: 258 258 app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.') 259 259 model = models.get_model(app_label, model_name) 260 self._profile_cache = model._default_manager. get(user__id__exact=self.id)260 self._profile_cache = model._default_manager.select_related(depth=1).get(user__id__exact=self.id) 261 261 except (ImportError, ImproperlyConfigured): 262 262 raise SiteProfileNotAvailable 263 263 return self._profile_cache