PhysikOnline-FFM / po-fp-backend

MIT License
0 stars 0 forks source link

Fehler beim Akzeptieren der Partnerauswahl #45

Closed larsgroeber closed 6 years ago

larsgroeber commented 6 years ago
AttributeError at /api/user_partner/2/
'FpUserRegistrant' object has no attribute 'get'

Request Method: PUT
Request URL: http://po-fp-staging.physikelearning.de/api/user_partner/2/
Django Version: 1.11
Python Executable: /usr/local/bin/python
Python Version: 3.6.3
Python Path: ['/app', '/usr/local/bin', '/usr/local/lib/python36.zip', '/usr/local/lib/python3.6', '/usr/local/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/site-packages/odf', '/usr/local/lib/python3.6/site-packages/odf', '/usr/local/lib/python3.6/site-packages/odf', '/usr/local/lib/python3.6/site-packages/odf', '/usr/local/lib/python3.6/site-packages/odf', '/usr/local/lib/python3.6/site-packages/odf', '/usr/local/lib/python3.6/site-packages/odf']
Server time: Sun, 25 Feb 2018 22:28:20 +0000
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'fpraktikum',
 'django_extensions',
 'rest_framework',
 'corsheaders',
 'drf_yasg',
 'import_export']
Installed Middleware:
['corsheaders.middleware.CorsMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware']

Traceback:  

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
  58.         return view_func(*args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/rest_framework/viewsets.py" in view
  95.             return self.dispatch(request, *args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/django/utils/decorators.py" in _wrapper
  67.             return bound_func(*args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
  58.         return view_func(*args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/django/utils/decorators.py" in bound_func
  63.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
  494.             response = self.handle_exception(exc)

File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py" in handle_exception
  454.             self.raise_uncaught_exception(exc)

File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
  491.             response = handler(request, *args, **kwargs)

File "/app/fpraktikum/api_views.py" in update
  173.         send_email(instance.registrant.get(), "accept_acc")

Exception Type: AttributeError at /api/user_partner/2/
Exception Value: 'FpUserRegistrant' object has no attribute 'get'
Request information:
USER: AnonymousUser

GET: No GET data

POST: No POST data

FILES: No FILES data

COOKIES: No cookie data