Skip to content

Commit

Permalink
Label column finder is now case-insensitive
Browse files Browse the repository at this point in the history
Closes #1544
  • Loading branch information
simonw authored Dec 7, 2021
1 parent 36b596e commit 737115e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datasette/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ async def label_column_for_table(self, table):
return explicit_label_column
column_names = await self.execute_fn(lambda conn: table_columns(conn, table))
# Is there a name or title column?
name_or_title = [c for c in column_names if c in ("name", "title")]
name_or_title = [c for c in column_names if c.lower() in ("name", "title")]
if name_or_title:
return name_or_title[0]
# If a table has two columns, one of which is ID, then label_column is the other one
Expand Down

0 comments on commit 737115e

Please sign in to comment.