Open freezed opened 6 years ago
nutrition_grades
Substitute search fails :
Ricoré Original (Nestle) - [E]
Environment: Request Method: GET Request URL: http://127.0.0.1:8000/ersatz/candidates/7613032655495 Django Version: 2.1.1 Python Version: 3.6.7 Installed Applications: ['account.apps.AccountConfig', 'ersatz.apps.ErsatzConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware', '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'] Traceback: File "~/git/ocp8/.venv/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner 34. response = get_response(request) File "~/git/ocp8/.venv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response 126. response = self.process_exception_by_middleware(e, request) File "~/git/ocp8/.venv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response 124. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "~/git/ocp8/ersatz/views/views.py" in candidates 25. context = ersatz.get_substitute_context() File "~/git/ocp8/ersatz/views/toolbox.py" in get_substitute_context 391. context = self.get_candidate(self.product_val['nutrition_grades']) File "~/git/ocp8/ersatz/views/toolbox.py" in get_candidate 411. ersatz_candidates = {cat: list() for cat in ng_sequence[png]} Exception Type: KeyError at /ersatz/candidates/7613032655495 Exception Value: ''
Step to reproduce
nutrition_grades
nutrition_grades
Substitute search fails :
Ricoré Original (Nestle) - [E]