From 0846b44bd96917c92a7e3d6241cd020c6bcedf6f Mon Sep 17 00:00:00 2001 From: John Bodley <4567245+john-bodley@users.noreply.github.com> Date: Fri, 7 Oct 2022 17:06:34 -0700 Subject: [PATCH] fix: Include database filter when fetching table extra dict --- superset/views/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/superset/views/core.py b/superset/views/core.py index 1382fbd02050f..60ce1edfd2dc6 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -1198,7 +1198,10 @@ def tables( # pylint: disable=no-self-use extra_dict_by_name = { table.name: table.extra_dict for table in ( - db.session.query(SqlaTable).filter(SqlaTable.schema == schema_parsed) + db.session.query(SqlaTable).filter( + SqlaTable.database_id == database.id, + SqlaTable.schema == schema_parsed, + ) ).all() }