-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
Milestone
Description
Describe the bug
Incomplete/invalid designations for the MPC Explorer search term can cause a crash with:
IndexError at /catalogs/query
list index out of range
Request Method: POST
Request URL: http://127.0.0.1:8000/catalogs/query/
Django Version: 4.2.26
Exception type: IndexError
Exception value: list index out of range
Exception location: /home/tlister/venv/fomo_venv/lib/python3.12/site-packages/tom_catalogs/harvesters/mpc.py, line 133, in to_target
Raised during: tom_catalogs.views.CatalogQueryView
To Reproduce
Steps to reproduce the behavior:
- Go to Targets->Create Targets->Catalog search
- Select 'MPC Explorer'
- Enter 'C/202' in Term field
- See error
Expected behavior
Proper validation and rejection of bad value without crashing
Desktop:
- OS: Windows 11
- Browser: Firefox
- Version: 2.27.1
- Python Version: 3.12.3
Additional context
Will create a branch and fix in my fork my fork
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Triage