Skip to content

Fix IndexError for blob columns in join-backed views#2658

Open
RamiNoodle733 wants to merge 2 commits intosimonw:mainfrom
RamiNoodle733:fix/issue-2601
Open

Fix IndexError for blob columns in join-backed views#2658
RamiNoodle733 wants to merge 2 commits intosimonw:mainfrom
RamiNoodle733:fix/issue-2601

Conversation

@RamiNoodle733
Copy link
Copy Markdown

@RamiNoodle733 RamiNoodle733 commented Mar 8, 2026

Fixes #2601

Summary

  • Avoid crashing table rendering when a row has binary data but no usable PK/rowid path (e.g. join-backed views)
  • Keep blob download links when a row path can be built
  • Fall back to non-link binary display text when a row path is unavailable
  • Add a regression test covering a join view with a blob column

Verification

  • .venv/bin/ruff check datasette/views/table.py tests/test_table_html.py
  • .venv/bin/black --check datasette/views/table.py tests/test_table_html.py
  • .venv/bin/python -m pytest -q tests/test_table_html.py -k "blob_column_in_join_view_does_not_error or binary_data_display_in_table"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IndexError when table view has binary column on right side of join

1 participant