Group is not always properly parsed
Created by: slifty
There is a recurring 500 error in the logs (since at least May 15th) which looks something like:
Internal Server Error: /api/RacialEquity2030/id/809.mwiki
Traceback (most recent call last):
File "/home/deploy/.local/share/virtualenvs/torquedata-GV3iMLbu/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/deploy/.local/share/virtualenvs/torquedata-GV3iMLbu/lib/python3.7/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/deploy/torquedata/torque/torquedata/core/views.py", line 259, in get_row_view
return get_row(group, wiki_key, key, fmt, sheet_name, request.GET.get("view", None))
File "/home/deploy/torquedata/torque/torquedata/core/views.py", line 229, in get_row
group=group,
File "/home/deploy/.local/share/virtualenvs/torquedata-GV3iMLbu/lib/python3.7/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/deploy/.local/share/virtualenvs/torquedata-GV3iMLbu/lib/python3.7/site-packages/django/db/models/query.py", line 437, in get
self.model._meta.object_name
core.models.SheetConfig.DoesNotExist: SheetConfig matching query does not exist
[08/Jul/2021 00:09:47] "GET /api/RacialEquity2030/id/809.mwiki?group=&wiki_key=RacialEquity2030&view=Evaluations HTTP/1.0" 500 69666
You'll notice that there is no group
defined in the request URL; we need to figure out why and correct the issue.