Skip to content

Commit 4c24acf

Browse files
sadpandajoeclaude
andcommitted
fix(typing): pass str dataset ids in tree table guest RLS rules
The full-tree mypy run flags tree_table_guest_tests.py:704 and :841: GuestTokenRlsRule.dataset is typed Optional[str], but the tests passed self.table.id (int). Scoped mypy runs resolve SqlaTable.id as Any because superset_core is follow_imports=skip, so the per-PR check did not catch it. Runtime compares str(rule["dataset"]) to str(dataset.id), so behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 9969fe9 commit 4c24acf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tests/integration_tests/charts/data/tree_table_guest_tests.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def test_guest_children_keep_rls_with_cleared_sql_filters(self) -> None:
701701
"id": str(self.embedded.uuid),
702702
}
703703
],
704-
[{"dataset": self.table.id, "clause": "gender = 'boy'"}],
704+
[{"dataset": str(self.table.id), "clause": "gender = 'boy'"}],
705705
)
706706
for stored_sql in (False, True):
707707
params = json.loads(self.chart_c.params)
@@ -838,7 +838,7 @@ def test_guest_csv_export(self) -> None:
838838
"id": str(self.embedded.uuid),
839839
}
840840
],
841-
[{"dataset": self.table.id, "clause": "gender = 'boy'"}],
841+
[{"dataset": str(self.table.id), "clause": "gender = 'boy'"}],
842842
)
843843
role = security_manager.find_role(self.app.config["GUEST_ROLE_NAME"])
844844
can_csv = security_manager.find_permission_view_menu("can_csv", "Superset")

0 commit comments

Comments
 (0)