simonw / django-sql-dashboard

Django app for building dashboards using raw SQL queries
https://django-sql-dashboard.datasette.io/
Apache License 2.0
437 stars 37 forks source link

TypeError: not enough arguments for format string #73

Closed simonw closed 3 years ago

simonw commented 3 years ago

Spotted this in Sentry for a deployment of this library:

TypeError: not enough arguments for format string
  File "django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django_sql_dashboard/views.py", line 281, in dashboard
    return _dashboard_index(
  File "django_sql_dashboard/views.py", line 117, in _dashboard_index
    extracted = extract_named_parameters(sql)
  File "django_sql_dashboard/utils.py", line 72, in extract_named_parameters
    sql % capture
simonw commented 3 years ago

Fixed this in #75.