Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user has no profile #77

Closed
brumle80 opened this issue Aug 29, 2016 · 2 comments
Closed

user has no profile #77

brumle80 opened this issue Aug 29, 2016 · 2 comments

Comments

@brumle80
Copy link

brumle80 commented Aug 29, 2016

for some reason on a fresh local install following the readme and testing with ./manage.py runserver I get "user has no profile" when logging in for the first time.

am I missing something or is this a bug?

Environment:


Request Method: GET
Request URL: http://healthchecks.***.**/

Django Version: 1.9
Python Version: 3.4.3
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.humanize',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'compressor',
 'djmail',
 'hc.accounts',
 'hc.api',
 'hc.front',
 'hc.payments')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'hc.accounts.middleware.TeamAccessMiddleware')



Traceback:

File "/www/sites/healthchecks.telsys.no/hc-venv/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
  123.                 response = middleware_method(request)

File "/www/sites/healthchecks.telsys.no/healthchecks/hc/accounts/middleware.py" in process_request
  13.         profile = request.user.profile

File "/www/sites/healthchecks.telsys.no/hc-venv/lib/python3.4/site-packages/django/utils/functional.py" in inner
  205.         return func(self._wrapped, *args)

File "/www/sites/healthchecks.telsys.no/hc-venv/lib/python3.4/site-packages/django/db/models/fields/related_descriptors.py" in __get__
  355.                     self.related.get_accessor_name()

Exception Type: RelatedObjectDoesNotExist at /
Exception Value: User has no profile.
@cuu508 cuu508 closed this as completed in ee3f49c Aug 29, 2016
@lekoOwO
Copy link

lekoOwO commented Aug 17, 2021

Hello, I still got this issue on v1.22.0 when try logging in as superuser.

@cuu508
Copy link
Member

cuu508 commented Aug 18, 2021

@lekoOwO just pushed a fix.

If you cannot upgrade now, you can create another superuser with manage.py createsuperuser. The new superuser will have a profile and will be able to log in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants