Fixed #2326 -- Fixed exception catching in django.contrib.auth.models. Thanks, mir@noris.de
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3328 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
33f47ae30a
commit
f3a586a557
|
@ -239,7 +239,7 @@ class User(models.Model):
|
||||||
app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.')
|
app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.')
|
||||||
model = models.get_model(app_label, model_name)
|
model = models.get_model(app_label, model_name)
|
||||||
self._profile_cache = model._default_manager.get(user__id__exact=self.id)
|
self._profile_cache = model._default_manager.get(user__id__exact=self.id)
|
||||||
except ImportError, ImproperlyConfigured:
|
except (ImportError, ImproperlyConfigured):
|
||||||
raise SiteProfileNotAvailable
|
raise SiteProfileNotAvailable
|
||||||
return self._profile_cache
|
return self._profile_cache
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue