louking / members

member activity management
Other
1 stars 2 forks source link

racing team applications view: does not handle case where there's only one result #505

Closed louking closed 2 years ago

louking commented 2 years ago
127.0.0.1 - - [14/Feb/2022 14:10:03] "GET /admin/fsrc/rt_applns?interest=fsrc HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\werkzeug\serving.py", line 323, in run_wsgi
    execute(self.server.app)
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\werkzeug\serving.py", line 312, in execute
    application_iter = app(environ, start_response)
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\_compat.py", line 39, in reraise
    raise value
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\_compat.py", line 39, in reraise
    raise value
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask_security\decorators.py", line 376, in decorated_view
    return fn(*args, **dkwargs)
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\views.py", line 89, in view
    return self.dispatch_request(*args, **kwargs)
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\views.py", line 163, in dispatch_request
    return meth(*args, **kwargs)
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\loutilities\tables.py", line 2796, in get
    return super(DbCrudApi, self).get()
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\loutilities\tables.py", line 1263, in get
    return self._renderpage()
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\loutilities\tables.py", line 991, in _renderpage
    thisentry = self.nexttablerow()
  File "C:\Users\lking\Documents\Lou's Software\projects\members\members\members\views\admin\racingteam_admin.py", line 394, in nexttablerow
    clientrec.update(self._result2client(results[ndx], ndx+1))
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\sortedcontainers\sortedlist.py", line 901, in __getitem__
    pos, idx = self._pos(index)
  File "c:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\sortedcontainers\sortedlist.py", line 667, in _pos
    raise IndexError('list index out of range')
IndexError: list index out of range