Ticket #2326: auth-models-exception.diff

File auth-models-exception.diff, 552 bytes (added by mir@…, 9 years ago)

promised patch

  • django/contrib/auth/models.py

    a b class User(models.Model): 
    239239                app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.')
    240240                model = models.get_model(app_label, model_name)
    241241                self._profile_cache = model._default_manager.get(user__id__exact=self.id)
    242             except ImportError, ImproperlyConfigured:
     242            except (ImportError, ImproperlyConfigured):
    243243                raise SiteProfileNotAvailable
    244244        return self._profile_cache
    245245
Back to Top