Ticket #2416: 2416.diff

File 2416.diff, 737 bytes (added by wiz, 9 years ago)

my workover for both issues

  • models.py

     
    243243                raise SiteProfileNotAvailable
    244244            try:
    245245                app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.')
     246                models.get_models() # burn in cache
    246247                model = models.get_model(app_label, model_name)
    247                 self._profile_cache = model._default_manager.get(user__id__exact=self.id)
     248                self._profile_cache = model._default_manager.get(pk=self.id)
    248249            except (ImportError, ImproperlyConfigured):
    249250                raise SiteProfileNotAvailable
    250251        return self._profile_cache
Back to Top