Received 500 on export Student Scores
Summary
Received 500 on export Student Scores
Steps to reproduce
Example Project
What is the current bug behavior?
What is the expected correct behavior?
Relevant logs and/or screenshots
AttributeError at /api/export/json/
'NoneType' object has no attribute 'module_reference'
Request Method: POST
Request URL: http://localhost:8000/api/export/json/
Django Version: 2.1.4
Python Executable: /home/robin/code/grady/.venv/bin/python
Python Version: 3.6.2
Python Path: ['/home/robin/code/grady', '/usr/local/lib/python36.zip', '/usr/local/lib/python3.6', '/usr/local/lib/python3.6/lib-dynload', '/home/robin/code/grady/.venv/lib/python3.6/site-packages']
Server time: Thu, 14 Feb 2019 14:50:37 +0000
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'whitenoise.runserver_nostatic',
'django.contrib.staticfiles',
'django_extensions',
'rest_framework',
'corsheaders',
'drf_yasg',
'core']
Installed Middleware:
['corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
'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 "/home/robin/code/grady/.venv/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/home/robin/code/grady/.venv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
126. response = self.process_exception_by_middleware(e, request)
File "/home/robin/code/grady/.venv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
124. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.6/contextlib.py" in inner
52. return func(*args, **kwds)
File "/home/robin/code/grady/.venv/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
54. return view_func(*args, **kwargs)
File "/home/robin/code/grady/.venv/lib/python3.6/site-packages/django/views/generic/base.py" in view
68. return self.dispatch(request, *args, **kwargs)
File "/home/robin/code/grady/.venv/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
495. response = self.handle_exception(exc)
File "/home/robin/code/grady/.venv/lib/python3.6/site-packages/rest_framework/views.py" in handle_exception
455. self.raise_uncaught_exception(exc)
File "/home/robin/code/grady/.venv/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
492. response = handler(request, *args, **kwargs)
File "/home/robin/code/grady/core/views/export.py" in post
47. in StudentInfo.get_annotated_score_submission_list()]
File "/home/robin/code/grady/core/views/export.py" in <listcomp>
46. } for student
Exception Type: AttributeError at /api/export/json/
Exception Value: 'NoneType' object has no attribute 'module_reference'
Request information:
USER: hundt