#2208 (IndexError: list index out of range when trying to delete a country)
by Luc Saffre · in Developers · assigned to tonis
Summary
Observed under ExtJS 3. Reproduceable e.g. in min1. Just try to delete a country. Maybe related to the fact that Countries use the iso_code as primary key. They don't have an AutoIdField.
AjaxExceptionResponse IndexError: list index out of range
in request GET /api/countries/Countries/BE?_dc=1513451393193&an=delete_selected&sr=
TRACEBACK:
File "/media/dell1tb/virtualenvs/py27/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/media/dell1tb/virtualenvs/py27/local/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
return self.dispatch(request, *args, **kwargs)
File "/media/dell1tb/virtualenvs/py27/local/lib/python2.7/site-packages/django/views/generic/base.py", line 88, in dispatch
return handler(request, *args, **kwargs)
File "/media/dell1tb/work/lino/lino/modlib/extjs/views.py", line 498, in get
elem = ar.selected_rows[0]
[16/Dec/2017 21:09:53] "GET /api/countries/Countries/BE?_dc=1513451393193&an=delete_selected&sr= HTTP/1.1" 400 35