You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a regression: inspecting a fully working RawQuery with django-debug-toolbar 1.5 results in an exception that int where expected, whereas str has been received.
Internal Server Error: /__debug__/sql_select/
Traceback (most recent call last):
File "django/core/handlers/exception.py", line 39, in inner
response = get_response(request)
File "django/core/handlers/base.py", line 249, in _legacy_get_response
response = self._get_response(request)
File "django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "debug_toolbar/panels/sql/views.py", line 19, in sql_select
cursor.execute(sql, params)
File "django/db/backends/utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
TypeError: list indices must be integers, not str
Hi,
if I want to build a custom query which takes a dictionary for parameters the debug toolbar crashes.
Person.object.raw('select %(id)s as id', {'id': 23})
The error message is
Exception Type: TypeError
Exception Value: format requires a mapping
The text was updated successfully, but these errors were encountered: