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

?_nocol= removes that column from the filter interface #1503

simonw opened this issue Nov 10, 2021 · 1 comment

?_nocol= removes that column from the filter interface #1503

simonw opened this issue Nov 10, 2021 · 1 comment


Copy link

simonw commented Nov 10, 2021

e.g. on


This causes weird behaviour when you e.g. facet by a hidden column, since selecting facets and then re-submitting the form will clear the selected filter.


@simonw simonw added the bug label Nov 10, 2021
@simonw simonw closed this as completed in c9e3cfe Nov 14, 2021
Copy link
Owner Author

simonw commented Nov 14, 2021


    def test_table_html_filter_form_column_options(
        path, expected_column_options, app_client
        response = app_client.get(path)
        assert response.status == 200
        form = Soup(response.body, "html.parser").find("form")
        column_options = [
            o.attrs.get("value") or o.string
            for o in"select[name=_filter_column] option")
>       assert expected_column_options == column_options
E       AssertionError: assert ['- column -'...wid', 'value'] == ['- column -', 'value']
E         At index 1 diff: 'rowid' != 'value'
E         Left contains one more item: 'value'
E         Use -v to get the full diff

This is because rowid isn't a table column but IS returned by the query used on that page.

My solution: start with the query columns, but then add any table columns that were not already returned by the query to the end of the filter_columns list.

simonw added a commit that referenced this issue Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant