mirror of
https://github.com/apache/superset.git
synced 2026-04-26 03:24:53 +00:00
fix(security-manager): switch from deprecated get_session to session attribute (#35290)
(cherry picked from commit 04b1a45416)
This commit is contained in:
@@ -622,7 +622,7 @@ class SupersetSecurityManager( # pylint: disable=too-many-public-methods
|
||||
and form_data.get("slice_id") == 0
|
||||
and (chart_id := form_data.get("chart_id"))
|
||||
and (
|
||||
slc := self.get_session.query(Slice)
|
||||
slc := self.session.query(Slice)
|
||||
.filter(Slice.id == chart_id)
|
||||
.one_or_none()
|
||||
)
|
||||
@@ -632,7 +632,7 @@ class SupersetSecurityManager( # pylint: disable=too-many-public-methods
|
||||
and (
|
||||
drillable_columns := {
|
||||
row[0]
|
||||
for row in self.get_session.query(TableColumn.column_name)
|
||||
for row in self.session.query(TableColumn.column_name)
|
||||
.filter(TableColumn.table_id == datasource.id)
|
||||
.filter(TableColumn.groupby)
|
||||
.all()
|
||||
|
||||
Reference in New Issue
Block a user