Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code that detects the label column for a table is case-sensitive #1544

Closed
simonw opened this issue Dec 7, 2021 · 2 comments
Closed

Code that detects the label column for a table is case-sensitive #1544

simonw opened this issue Dec 7, 2021 · 2 comments
Labels

Comments

@simonw
Copy link
Owner

simonw commented Dec 7, 2021

I just noticed that a column called Name is not being picked up as the label column for a table.

@simonw simonw added the bug label Dec 7, 2021
@simonw
Copy link
Owner Author

simonw commented Dec 7, 2021

Here's the code at fault:

# Is there a name or title column?
name_or_title = [c for c in column_names if c in ("name", "title")]
if name_or_title:
return name_or_title[0]

@simonw
Copy link
Owner Author

simonw commented Dec 7, 2021

I'm feeling rushed today so I'm going to fix this without adding a test!

@simonw simonw closed this as completed in 737115e Dec 7, 2021
simonw added a commit to simonw/git-history that referenced this issue Dec 7, 2021
Refs #30. I want to use the fix for this:

simonw/datasette#1544
simonw added a commit that referenced this issue Dec 17, 2021
simonw added a commit that referenced this issue Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant