Error with chart filters after applying RLS for dataset on PostgreSQL - column values are not available for preview #32394
Labels
authentication:row-level-security
Related to Row Level Security
data:connect:postgres
Related to Postgres
Bug description
How to reproduce the bug
Add RLS rule for dataset on Postgresql

Create chart using this dataset
Try to apply filter on the chart
As you can see on screeshot, no values are loaded for this column

error:

error in logs "ERROR:flask_appbuilder.api:dict is not a sequence"
It is possible to type values manually and it will work

Dashboard filters also work correctly and load all available values.
Screenshots/recordings
No response
Superset version
4.1.1
Python version
3.9
Node version
I don't know
Browser
Chrome
Additional context
We face such error only with datasets on Postgresql
full log
213:ERROR:flask_appbuilder.api:dict is not a sequence
Traceback (most recent call last):
File "/app/venv/lib64/python3.9/site-packages/flask_appbuilder/api/init.py", line 111, in wraps
File "/app/superset/views/base_api.py", line 119, in wraps
File "/app/superset/utils/core.py", line 1364, in time_function
File "/app/superset/utils/log.py", line 303, in wrapper
File "/app/superset/datasource/api.py", line 120, in get_column_values
File "/app/superset/models/helpers.py", line 1372, in values_for_column
File "/app/venv/lib64/python3.9/site-packages/pandas/io/sql.py", line 469, in read_sql_query
File "/app/venv/lib64/python3.9/site-packages/pandas/io/sql.py", line 1738, in read_query
File "/app/venv/lib64/python3.9/site-packages/pandas/io/sql.py", line 1562, in execute
File "/app/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1770, in exec_driver_sql
File "/app/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1674, in _exec_driver_sql
File "/app/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1953, in _execute_context
File "/app/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 2138, in _handle_dbapi_exception
File "/app/venv/lib64/python3.9/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
File "/app/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
File "/app/venv/lib64/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
TypeError: dict is not a sequence
Checklist
The text was updated successfully, but these errors were encountered: