dtinit / portmap

A structured search frontend for portability articles to help people find solutions and help us learn about needs
https://portmap.dtinit.org
Other
2 stars 0 forks source link

Server error - django.utils.datastructures.MultiValueDictKeyError: 'datasource' #113

Open lisad opened 5 months ago

lisad commented 5 months ago
  File "/layers/google.python.pip/pip/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/portmap/core/views.py", line 162, in find_articles
    sources__contains=form.data['datasource'],
                      ~~~~~~~~~^^^^^^^^^^^^^^
  File "/layers/google.python.pip/pip/lib/python3.11/site-packages/django/utils/datastructures.py", line 86, in __getitem__
    raise MultiValueDictKeyError(key)
django.utils.datastructures.MultiValueDictKeyError: 'datasource' 

My initial guess is that the find_articles view is sometimes being called with the form not filled out fully